Skip to content

Commit

Permalink
Update filter menu icon on theme change
Browse files Browse the repository at this point in the history
  • Loading branch information
jonhermansen committed Jul 19, 2023
1 parent 0c2144d commit 4319578
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions editor/scene_tree_dock.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1385,6 +1385,11 @@ void SceneTreeDock::_notification(int p_what) {
button_tree_menu->set_icon(get_theme_icon(SNAME("GuiTabMenuHl"), SNAME("EditorIcons")));

filter->set_right_icon(get_theme_icon(SNAME("Search"), SNAME("EditorIcons")));
// Also remember to update the theme icon in filter menu, if menu was ever opened
int filter_menu_search_icon_idx = filter->get_menu()->get_item_idx_from_text(TTR("Filters"));
if (filter_menu_search_icon_idx != -1) {
filter->get_menu()->set_item_icon(filter_menu_search_icon_idx, get_theme_icon(SNAME("Search"), SNAME("EditorIcons")));
}

// These buttons are created on READY, because reasons...
if (button_2d) {
Expand Down

0 comments on commit 4319578

Please sign in to comment.