1
0
Fork 0
mirror of https://github.com/Orama-Interactive/Pixelorama.git synced 2025-01-31 07:29:49 +00:00

Made the fake grabber change texture based on theme & other small UI changes

This commit is contained in:
OverloadedOrama 2020-05-06 01:19:09 +03:00
parent c1602ad26a
commit f99b486919
4 changed files with 23 additions and 8 deletions

View file

@ -579,7 +579,7 @@ VScrollBar/styles/scroll_focus = null
VSeparator/constants/separation = 4 VSeparator/constants/separation = 4
VSeparator/styles/separator = SubResource( 29 ) VSeparator/styles/separator = SubResource( 29 )
VSplitContainer/constants/autohide = 1 VSplitContainer/constants/autohide = 1
VSplitContainer/constants/separation = 12 VSplitContainer/constants/separation = 6
VSplitContainer/icons/grabber = ExtResource( 4 ) VSplitContainer/icons/grabber = ExtResource( 4 )
VSplitContainer/styles/bg = null VSplitContainer/styles/bg = null
WindowDialog/colors/title_color = Color( 1, 1, 1, 1 ) WindowDialog/colors/title_color = Color( 1, 1, 1, 1 )

View file

@ -656,15 +656,16 @@ size_flags_vertical = 3
[node name="LeftPanelContainer" type="PanelContainer" parent="MenuAndUI/UI/RightPanel/PreviewAndPalettes/ToolAndPaletteVSplit/ColorAndToolOptions/ScrollContainer/ToolOptions"] [node name="LeftPanelContainer" type="PanelContainer" parent="MenuAndUI/UI/RightPanel/PreviewAndPalettes/ToolAndPaletteVSplit/ColorAndToolOptions/ScrollContainer/ToolOptions"]
margin_left = 16.0 margin_left = 16.0
margin_right = 146.0 margin_right = 146.0
margin_bottom = 196.0 margin_bottom = 130.0
rect_min_size = Vector2( 130, 0 ) rect_min_size = Vector2( 130, 0 )
size_flags_horizontal = 6 size_flags_horizontal = 6
size_flags_vertical = 0
[node name="LeftToolOptions" type="VBoxContainer" parent="MenuAndUI/UI/RightPanel/PreviewAndPalettes/ToolAndPaletteVSplit/ColorAndToolOptions/ScrollContainer/ToolOptions/LeftPanelContainer"] [node name="LeftToolOptions" type="VBoxContainer" parent="MenuAndUI/UI/RightPanel/PreviewAndPalettes/ToolAndPaletteVSplit/ColorAndToolOptions/ScrollContainer/ToolOptions/LeftPanelContainer"]
margin_left = 4.5 margin_left = 4.5
margin_top = 3.0 margin_top = 3.0
margin_right = 125.5 margin_right = 125.5
margin_bottom = 193.0 margin_bottom = 127.0
size_flags_horizontal = 3 size_flags_horizontal = 3
[node name="LeftLabel" type="Label" parent="MenuAndUI/UI/RightPanel/PreviewAndPalettes/ToolAndPaletteVSplit/ColorAndToolOptions/ScrollContainer/ToolOptions/LeftPanelContainer/LeftToolOptions"] [node name="LeftLabel" type="Label" parent="MenuAndUI/UI/RightPanel/PreviewAndPalettes/ToolAndPaletteVSplit/ColorAndToolOptions/ScrollContainer/ToolOptions/LeftPanelContainer/LeftToolOptions"]
@ -1070,15 +1071,16 @@ texture_pressed = ExtResource( 41 )
[node name="RightPanelContainer" type="PanelContainer" parent="MenuAndUI/UI/RightPanel/PreviewAndPalettes/ToolAndPaletteVSplit/ColorAndToolOptions/ScrollContainer/ToolOptions"] [node name="RightPanelContainer" type="PanelContainer" parent="MenuAndUI/UI/RightPanel/PreviewAndPalettes/ToolAndPaletteVSplit/ColorAndToolOptions/ScrollContainer/ToolOptions"]
margin_left = 183.0 margin_left = 183.0
margin_right = 313.0 margin_right = 313.0
margin_bottom = 196.0 margin_bottom = 130.0
rect_min_size = Vector2( 130, 0 ) rect_min_size = Vector2( 130, 0 )
size_flags_horizontal = 6 size_flags_horizontal = 6
size_flags_vertical = 0
[node name="RightToolOptions" type="VBoxContainer" parent="MenuAndUI/UI/RightPanel/PreviewAndPalettes/ToolAndPaletteVSplit/ColorAndToolOptions/ScrollContainer/ToolOptions/RightPanelContainer"] [node name="RightToolOptions" type="VBoxContainer" parent="MenuAndUI/UI/RightPanel/PreviewAndPalettes/ToolAndPaletteVSplit/ColorAndToolOptions/ScrollContainer/ToolOptions/RightPanelContainer"]
margin_left = 4.5 margin_left = 4.5
margin_top = 3.0 margin_top = 3.0
margin_right = 125.5 margin_right = 125.5
margin_bottom = 193.0 margin_bottom = 127.0
size_flags_horizontal = 3 size_flags_horizontal = 3
[node name="RightLabel" type="Label" parent="MenuAndUI/UI/RightPanel/PreviewAndPalettes/ToolAndPaletteVSplit/ColorAndToolOptions/ScrollContainer/ToolOptions/RightPanelContainer/RightToolOptions"] [node name="RightLabel" type="Label" parent="MenuAndUI/UI/RightPanel/PreviewAndPalettes/ToolAndPaletteVSplit/ColorAndToolOptions/ScrollContainer/ToolOptions/RightPanelContainer/RightToolOptions"]

View file

@ -361,6 +361,13 @@ func change_theme(ID : int) -> void:
Global.vertical_ruler.add_stylebox_override("hover", ruler_style) Global.vertical_ruler.add_stylebox_override("hover", ruler_style)
Global.vertical_ruler.add_stylebox_override("focus", ruler_style) Global.vertical_ruler.add_stylebox_override("focus", ruler_style)
var fake_vsplit_grabber : TextureRect = Global.find_node_by_name(Global.animation_timeline, "FakeVSplitContainerGrabber")
# fake_vsplit_grabber.texture = main_theme.get_icon("Grabber", "VSplitContainer")
if Global.theme_type == "Dark":
fake_vsplit_grabber.texture = preload("res://assets/themes/dark/icons/vsplit.png")
else:
fake_vsplit_grabber.texture = preload("res://assets/themes/light/icons/vsplit.png")
for button in get_tree().get_nodes_in_group("UIButtons"): for button in get_tree().get_nodes_in_group("UIButtons"):
if button is TextureButton: if button is TextureButton:
var last_backslash = button.texture_normal.resource_path.get_base_dir().find_last("/") var last_backslash = button.texture_normal.resource_path.get_base_dir().find_last("/")

View file

@ -745,8 +745,14 @@ margin_right = 902.0
margin_bottom = 82.0 margin_bottom = 82.0
custom_constants/separation = 2 custom_constants/separation = 2
[node name="SpacerControl" type="Control" parent="AnimationContainer/TimelineContainer/OpacityAndTagContainer"]
margin_right = 4.0
margin_bottom = 32.0
rect_min_size = Vector2( 4, 0 )
[node name="OpacityContainer" type="HBoxContainer" parent="AnimationContainer/TimelineContainer/OpacityAndTagContainer"] [node name="OpacityContainer" type="HBoxContainer" parent="AnimationContainer/TimelineContainer/OpacityAndTagContainer"]
margin_right = 214.0 margin_left = 6.0
margin_right = 220.0
margin_bottom = 32.0 margin_bottom = 32.0
rect_min_size = Vector2( 214, 0 ) rect_min_size = Vector2( 214, 0 )
@ -780,7 +786,7 @@ value = 100.0
align = 1 align = 1
[node name="TagScroll" type="ScrollContainer" parent="AnimationContainer/TimelineContainer/OpacityAndTagContainer"] [node name="TagScroll" type="ScrollContainer" parent="AnimationContainer/TimelineContainer/OpacityAndTagContainer"]
margin_left = 216.0 margin_left = 222.0
margin_right = 902.0 margin_right = 902.0
margin_bottom = 32.0 margin_bottom = 32.0
rect_min_size = Vector2( 0, 32 ) rect_min_size = Vector2( 0, 32 )
@ -915,7 +921,7 @@ text = "Blue-Red Mode"
[node name="FrameTagDialog" parent="." instance=ExtResource( 42 )] [node name="FrameTagDialog" parent="." instance=ExtResource( 42 )]
[node name="TextureRect" type="TextureRect" parent="."] [node name="FakeVSplitContainerGrabber" type="TextureRect" parent="."]
anchor_left = 0.5 anchor_left = 0.5
anchor_right = 0.5 anchor_right = 0.5
margin_left = -24.0 margin_left = -24.0