diff --git a/src/UI/Timeline/LayerButton.gd b/src/UI/Timeline/LayerButton.gd index 2d7344803..6c0b58579 100644 --- a/src/UI/Timeline/LayerButton.gd +++ b/src/UI/Timeline/LayerButton.gd @@ -45,7 +45,7 @@ func _ready() -> void: for child in get_children(): if not child is Button: continue - var texture = child.get_child(0) + var texture := child.get_child(0) if not texture is TextureRect: continue texture.modulate = Global.modulate_icon_color diff --git a/src/UI/Timeline/LayerButton.tscn b/src/UI/Timeline/LayerButton.tscn index 302c3d67d..8353070cd 100644 --- a/src/UI/Timeline/LayerButton.tscn +++ b/src/UI/Timeline/LayerButton.tscn @@ -18,7 +18,12 @@ size_flags_horizontal = 3 theme_override_constants/separation = 0 script = ExtResource("1_6hlpe") -[node name="VisibilityButton" type="Button" parent="." groups=["UIButtons"]] +[node name="HBoxContainer" type="HBoxContainer" parent="."] +custom_minimum_size = Vector2(84, 0) +layout_mode = 2 +theme_override_constants/separation = 0 + +[node name="VisibilityButton" type="Button" parent="HBoxContainer" groups=["UIButtons"]] unique_name_in_owner = true custom_minimum_size = Vector2(28, 22) layout_mode = 2 @@ -26,7 +31,7 @@ tooltip_text = "Toggle layer's visibility" focus_mode = 0 mouse_default_cursor_shape = 2 -[node name="TextureRect" type="TextureRect" parent="VisibilityButton"] +[node name="TextureRect" type="TextureRect" parent="HBoxContainer/VisibilityButton"] layout_mode = 0 anchor_left = 0.5 anchor_top = 0.5 @@ -40,7 +45,7 @@ size_flags_horizontal = 0 size_flags_vertical = 0 texture = ExtResource("2_ef6fb") -[node name="LockButton" type="Button" parent="." groups=["UIButtons"]] +[node name="LockButton" type="Button" parent="HBoxContainer" groups=["UIButtons"]] unique_name_in_owner = true custom_minimum_size = Vector2(28, 22) layout_mode = 2 @@ -48,7 +53,7 @@ tooltip_text = "Lock/unlock layer" focus_mode = 0 mouse_default_cursor_shape = 2 -[node name="TextureRect" type="TextureRect" parent="LockButton"] +[node name="TextureRect" type="TextureRect" parent="HBoxContainer/LockButton"] layout_mode = 0 anchor_left = 0.5 anchor_top = 0.5 @@ -62,7 +67,7 @@ size_flags_horizontal = 0 size_flags_vertical = 0 texture = ExtResource("3_ah1my") -[node name="LinkButton" type="Button" parent="." groups=["UIButtons"]] +[node name="LinkButton" type="Button" parent="HBoxContainer" groups=["UIButtons"]] unique_name_in_owner = true visible = false custom_minimum_size = Vector2(28, 22) @@ -73,7 +78,7 @@ Linked cels share content across multiple frames" focus_mode = 0 mouse_default_cursor_shape = 2 -[node name="TextureRect" type="TextureRect" parent="LinkButton"] +[node name="TextureRect" type="TextureRect" parent="HBoxContainer/LinkButton"] layout_mode = 0 anchor_left = 0.5 anchor_top = 0.5 @@ -87,7 +92,7 @@ size_flags_horizontal = 0 size_flags_vertical = 0 texture = ExtResource("4_058qm") -[node name="ExpandButton" type="Button" parent="." groups=["UIButtons"]] +[node name="ExpandButton" type="Button" parent="HBoxContainer" groups=["UIButtons"]] unique_name_in_owner = true visible = false custom_minimum_size = Vector2(28, 22) @@ -96,7 +101,7 @@ tooltip_text = "Expand/collapse group" focus_mode = 0 mouse_default_cursor_shape = 2 -[node name="TextureRect" type="TextureRect" parent="ExpandButton"] +[node name="TextureRect" type="TextureRect" parent="HBoxContainer/ExpandButton"] layout_mode = 0 anchor_left = 0.5 anchor_top = 0.5 @@ -170,10 +175,10 @@ item_1/text = "Clipping mask" item_1/checkable = 1 item_1/id = 1 -[connection signal="pressed" from="VisibilityButton" to="." method="_on_visibility_button_pressed"] -[connection signal="pressed" from="LockButton" to="." method="_on_lock_button_pressed"] -[connection signal="pressed" from="LinkButton" to="." method="_on_link_button_pressed"] -[connection signal="pressed" from="ExpandButton" to="." method="_on_expand_button_pressed"] +[connection signal="pressed" from="HBoxContainer/VisibilityButton" to="." method="_on_visibility_button_pressed"] +[connection signal="pressed" from="HBoxContainer/LockButton" to="." method="_on_lock_button_pressed"] +[connection signal="pressed" from="HBoxContainer/LinkButton" to="." method="_on_link_button_pressed"] +[connection signal="pressed" from="HBoxContainer/ExpandButton" to="." method="_on_expand_button_pressed"] [connection signal="gui_input" from="LayerMainButton" to="." method="_on_main_button_gui_input"] [connection signal="focus_exited" from="LayerMainButton/LayerName/LayerNameLineEdit" to="." method="_on_layer_name_line_edit_focus_exited"] [connection signal="id_pressed" from="PopupMenu" to="." method="_on_popup_menu_id_pressed"]