mirror of
https://github.com/godotengine/godot.git
synced 2025-11-02 22:51:08 +00:00
More icon updates on theme change
This commit is contained in:
parent
51bbcbdec2
commit
0ac6e6acbe
5 changed files with 24 additions and 11 deletions
|
|
@ -435,8 +435,16 @@ void ShaderEditor::_menu_option(int p_option) {
|
|||
}
|
||||
|
||||
void ShaderEditor::_notification(int p_what) {
|
||||
if (p_what == NOTIFICATION_WM_WINDOW_FOCUS_IN) {
|
||||
_check_for_external_edit();
|
||||
switch (p_what) {
|
||||
case NOTIFICATION_ENTER_TREE:
|
||||
case NOTIFICATION_THEME_CHANGED: {
|
||||
PopupMenu *popup = help_menu->get_popup();
|
||||
popup->set_item_icon(popup->get_item_index(HELP_DOCS), get_theme_icon(SNAME("Instance"), SNAME("EditorIcons")));
|
||||
} break;
|
||||
|
||||
case NOTIFICATION_WM_WINDOW_FOCUS_IN: {
|
||||
_check_for_external_edit();
|
||||
} break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -772,7 +780,7 @@ ShaderEditor::ShaderEditor() {
|
|||
help_menu = memnew(MenuButton);
|
||||
help_menu->set_text(TTR("Help"));
|
||||
help_menu->set_switch_on_hover(true);
|
||||
help_menu->get_popup()->add_icon_item(EditorNode::get_singleton()->get_gui_base()->get_theme_icon(SNAME("Instance"), SNAME("EditorIcons")), TTR("Online Docs"), HELP_DOCS);
|
||||
help_menu->get_popup()->add_item(TTR("Online Docs"), HELP_DOCS);
|
||||
help_menu->get_popup()->connect("id_pressed", callable_mp(this, &ShaderEditor::_menu_option));
|
||||
|
||||
add_child(main_container);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue