diff options
author | booer <kel42@mail.ru> | 2020-09-17 09:33:19 +0700 |
---|---|---|
committer | booer <kel42@mail.ru> | 2020-09-17 09:33:19 +0700 |
commit | 3d693856552da4998a98492afaae2dc716cbd8b2 (patch) | |
tree | fe9d74235471510c7476610e0dc005838933f5a0 | |
parent | 6ac7b90097bceaaaad7fef3c5eb6eb705929f640 (diff) |
Fix changing icons' colors when switch dark and light theme
-rw-r--r-- | editor/scene_tree_dock.cpp | 10 | ||||
-rw-r--r-- | editor/scene_tree_dock.h | 3 |
2 files changed, 10 insertions, 3 deletions
diff --git a/editor/scene_tree_dock.cpp b/editor/scene_tree_dock.cpp index ce869feddd..d9c95b1944 100644 --- a/editor/scene_tree_dock.cpp +++ b/editor/scene_tree_dock.cpp @@ -1115,7 +1115,7 @@ void SceneTreeDock::_notification(int p_what) { beginner_node_shortcuts->set_name("BeginnerNodeShortcuts"); node_shortcuts->add_child(beginner_node_shortcuts); - Button *button_2d = memnew(Button); + button_2d = memnew(Button); beginner_node_shortcuts->add_child(button_2d); button_2d->set_text(TTR("2D Scene")); button_2d->set_icon(get_theme_icon("Node2D", "EditorIcons")); @@ -1127,7 +1127,7 @@ void SceneTreeDock::_notification(int p_what) { button_3d->set_icon(get_theme_icon("Node3D", "EditorIcons")); button_3d->connect("pressed", callable_mp(this, &SceneTreeDock::_tool_selected), make_binds(TOOL_CREATE_3D_SCENE, false)); - Button *button_ui = memnew(Button); + button_ui = memnew(Button); beginner_node_shortcuts->add_child(button_ui); button_ui->set_text(TTR("User Interface")); button_ui->set_icon(get_theme_icon("Control", "EditorIcons")); @@ -1137,7 +1137,7 @@ void SceneTreeDock::_notification(int p_what) { favorite_node_shortcuts->set_name("FavoriteNodeShortcuts"); node_shortcuts->add_child(favorite_node_shortcuts); - Button *button_custom = memnew(Button); + button_custom = memnew(Button); node_shortcuts->add_child(button_custom); button_custom->set_text(TTR("Other Node")); button_custom->set_icon(get_theme_icon("Add", "EditorIcons")); @@ -1160,6 +1160,10 @@ void SceneTreeDock::_notification(int p_what) { button_instance->set_icon(get_theme_icon("Instance", "EditorIcons")); button_create_script->set_icon(get_theme_icon("ScriptCreate", "EditorIcons")); button_detach_script->set_icon(get_theme_icon("ScriptRemove", "EditorIcons")); + button_2d->set_icon(get_theme_icon("Node2D", "EditorIcons")); + button_3d->set_icon(get_theme_icon("Node3D", "EditorIcons")); + button_ui->set_icon(get_theme_icon("Control", "EditorIcons")); + button_custom->set_icon(get_theme_icon("Add", "EditorIcons")); filter->set_right_icon(get_theme_icon("Search", "EditorIcons")); filter->set_clear_button_enabled(true); diff --git a/editor/scene_tree_dock.h b/editor/scene_tree_dock.h index 150c1976ef..c2c877bf68 100644 --- a/editor/scene_tree_dock.h +++ b/editor/scene_tree_dock.h @@ -110,7 +110,10 @@ class SceneTreeDock : public VBoxContainer { Button *button_create_script; Button *button_detach_script; + Button *button_2d; Button *button_3d; + Button *button_ui; + Button *button_custom; HBoxContainer *button_hb; Button *edit_local, *edit_remote; |