From 1a99d524d102bf71d1f77e4f9d26a347fcd1d2d1 Mon Sep 17 00:00:00 2001 From: Emmanouil Papadeas <35376950+OverloadedOrama@users.noreply.github.com> Date: Tue, 13 Aug 2024 04:23:56 +0300 Subject: [PATCH] Fix some buttons not being affected by the custom icon color on startup --- src/Autoload/Tools.gd | 1 + src/Preferences/RestoreDefaultButton.gd | 1 + src/UI/Timeline/LayerButton.gd | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Autoload/Tools.gd b/src/Autoload/Tools.gd index 94c10a7ef..e09e5f482 100644 --- a/src/Autoload/Tools.gd +++ b/src/Autoload/Tools.gd @@ -376,6 +376,7 @@ func add_tool_button(t: Tool, insert_pos := -1) -> void: tool_button.get_node("BackgroundLeft").modulate = Global.left_tool_color tool_button.get_node("BackgroundRight").modulate = Global.right_tool_color tool_button.get_node("ToolIcon").texture = t.icon + tool_button.get_node("ToolIcon").modulate = Global.modulate_icon_color tool_button.tooltip_text = t.generate_hint_tooltip() t.button_node = tool_button _tool_buttons.add_child(tool_button) diff --git a/src/Preferences/RestoreDefaultButton.gd b/src/Preferences/RestoreDefaultButton.gd index 1ad64d7f6..cb014a485 100644 --- a/src/Preferences/RestoreDefaultButton.gd +++ b/src/Preferences/RestoreDefaultButton.gd @@ -10,6 +10,7 @@ var node: Node func _ready() -> void: disabled = true + add_to_group(&"UIButtons") modulate = Global.modulate_icon_color texture_normal = preload("res://assets/graphics/misc/icon_reload.png") texture_disabled = ImageTexture.new() diff --git a/src/UI/Timeline/LayerButton.gd b/src/UI/Timeline/LayerButton.gd index aca3df875..4ac8667b6 100644 --- a/src/UI/Timeline/LayerButton.gd +++ b/src/UI/Timeline/LayerButton.gd @@ -42,7 +42,7 @@ func _ready() -> void: custom_minimum_size.y = Global.animation_timeline.cel_size label.text = layer.name line_edit.text = layer.name - for child in get_children(): + for child in $HBoxContainer.get_children(): if not child is Button: continue var texture := child.get_child(0)