You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-06 12:20:30 +00:00
More icon updates on theme change
This commit is contained in:
@@ -396,6 +396,7 @@ void EditorProfiler::_notification(int p_what) {
|
|||||||
switch (p_what) {
|
switch (p_what) {
|
||||||
case NOTIFICATION_ENTER_TREE:
|
case NOTIFICATION_ENTER_TREE:
|
||||||
case NOTIFICATION_LAYOUT_DIRECTION_CHANGED:
|
case NOTIFICATION_LAYOUT_DIRECTION_CHANGED:
|
||||||
|
case NOTIFICATION_THEME_CHANGED:
|
||||||
case NOTIFICATION_TRANSLATION_CHANGED: {
|
case NOTIFICATION_TRANSLATION_CHANGED: {
|
||||||
activate->set_icon(get_theme_icon(SNAME("Play"), SNAME("EditorIcons")));
|
activate->set_icon(get_theme_icon(SNAME("Play"), SNAME("EditorIcons")));
|
||||||
clear_button->set_icon(get_theme_icon(SNAME("Clear"), SNAME("EditorIcons")));
|
clear_button->set_icon(get_theme_icon(SNAME("Clear"), SNAME("EditorIcons")));
|
||||||
|
|||||||
@@ -426,6 +426,7 @@ void EditorVisualProfiler::_notification(int p_what) {
|
|||||||
switch (p_what) {
|
switch (p_what) {
|
||||||
case NOTIFICATION_ENTER_TREE:
|
case NOTIFICATION_ENTER_TREE:
|
||||||
case NOTIFICATION_LAYOUT_DIRECTION_CHANGED:
|
case NOTIFICATION_LAYOUT_DIRECTION_CHANGED:
|
||||||
|
case NOTIFICATION_THEME_CHANGED:
|
||||||
case NOTIFICATION_TRANSLATION_CHANGED: {
|
case NOTIFICATION_TRANSLATION_CHANGED: {
|
||||||
if (is_layout_rtl()) {
|
if (is_layout_rtl()) {
|
||||||
activate->set_icon(get_theme_icon(SNAME("PlayBackwards"), SNAME("EditorIcons")));
|
activate->set_icon(get_theme_icon(SNAME("PlayBackwards"), SNAME("EditorIcons")));
|
||||||
|
|||||||
@@ -779,18 +779,20 @@ void ScriptEditorDebugger::_set_reason_text(const String &p_reason, MessageType
|
|||||||
void ScriptEditorDebugger::_notification(int p_what) {
|
void ScriptEditorDebugger::_notification(int p_what) {
|
||||||
switch (p_what) {
|
switch (p_what) {
|
||||||
case NOTIFICATION_ENTER_TREE: {
|
case NOTIFICATION_ENTER_TREE: {
|
||||||
skip_breakpoints->set_icon(get_theme_icon(SNAME("DebugSkipBreakpointsOff"), SNAME("EditorIcons")));
|
|
||||||
copy->set_icon(get_theme_icon(SNAME("ActionCopy"), SNAME("EditorIcons")));
|
|
||||||
|
|
||||||
step->set_icon(get_theme_icon(SNAME("DebugStep"), SNAME("EditorIcons")));
|
|
||||||
next->set_icon(get_theme_icon(SNAME("DebugNext"), SNAME("EditorIcons")));
|
|
||||||
dobreak->set_icon(get_theme_icon(SNAME("Pause"), SNAME("EditorIcons")));
|
|
||||||
docontinue->set_icon(get_theme_icon(SNAME("DebugContinue"), SNAME("EditorIcons")));
|
|
||||||
le_set->connect("pressed", callable_mp(this, &ScriptEditorDebugger::_live_edit_set));
|
le_set->connect("pressed", callable_mp(this, &ScriptEditorDebugger::_live_edit_set));
|
||||||
le_clear->connect("pressed", callable_mp(this, &ScriptEditorDebugger::_live_edit_clear));
|
le_clear->connect("pressed", callable_mp(this, &ScriptEditorDebugger::_live_edit_clear));
|
||||||
error_tree->connect("item_selected", callable_mp(this, &ScriptEditorDebugger::_error_selected));
|
error_tree->connect("item_selected", callable_mp(this, &ScriptEditorDebugger::_error_selected));
|
||||||
error_tree->connect("item_activated", callable_mp(this, &ScriptEditorDebugger::_error_activated));
|
error_tree->connect("item_activated", callable_mp(this, &ScriptEditorDebugger::_error_activated));
|
||||||
breakpoints_tree->connect("item_activated", callable_mp(this, &ScriptEditorDebugger::_breakpoint_tree_clicked));
|
breakpoints_tree->connect("item_activated", callable_mp(this, &ScriptEditorDebugger::_breakpoint_tree_clicked));
|
||||||
|
[[fallthrough]];
|
||||||
|
}
|
||||||
|
case NOTIFICATION_THEME_CHANGED: {
|
||||||
|
skip_breakpoints->set_icon(get_theme_icon(skip_breakpoints_value ? SNAME("DebugSkipBreakpointsOn") : SNAME("DebugSkipBreakpointsOff"), SNAME("EditorIcons")));
|
||||||
|
copy->set_icon(get_theme_icon(SNAME("ActionCopy"), SNAME("EditorIcons")));
|
||||||
|
step->set_icon(get_theme_icon(SNAME("DebugStep"), SNAME("EditorIcons")));
|
||||||
|
next->set_icon(get_theme_icon(SNAME("DebugNext"), SNAME("EditorIcons")));
|
||||||
|
dobreak->set_icon(get_theme_icon(SNAME("Pause"), SNAME("EditorIcons")));
|
||||||
|
docontinue->set_icon(get_theme_icon(SNAME("DebugContinue"), SNAME("EditorIcons")));
|
||||||
vmem_refresh->set_icon(get_theme_icon(SNAME("Reload"), SNAME("EditorIcons")));
|
vmem_refresh->set_icon(get_theme_icon(SNAME("Reload"), SNAME("EditorIcons")));
|
||||||
vmem_export->set_icon(get_theme_icon(SNAME("Save"), SNAME("EditorIcons")));
|
vmem_export->set_icon(get_theme_icon(SNAME("Save"), SNAME("EditorIcons")));
|
||||||
search->set_right_icon(get_theme_icon(SNAME("Search"), SNAME("EditorIcons")));
|
search->set_right_icon(get_theme_icon(SNAME("Search"), SNAME("EditorIcons")));
|
||||||
|
|||||||
@@ -39,7 +39,8 @@
|
|||||||
|
|
||||||
void ResourcePreloaderEditor::_notification(int p_what) {
|
void ResourcePreloaderEditor::_notification(int p_what) {
|
||||||
switch (p_what) {
|
switch (p_what) {
|
||||||
case NOTIFICATION_ENTER_TREE: {
|
case NOTIFICATION_ENTER_TREE:
|
||||||
|
case NOTIFICATION_THEME_CHANGED: {
|
||||||
load->set_icon(get_theme_icon(SNAME("Folder"), SNAME("EditorIcons")));
|
load->set_icon(get_theme_icon(SNAME("Folder"), SNAME("EditorIcons")));
|
||||||
} break;
|
} break;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -435,8 +435,16 @@ void ShaderEditor::_menu_option(int p_option) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void ShaderEditor::_notification(int p_what) {
|
void ShaderEditor::_notification(int p_what) {
|
||||||
if (p_what == NOTIFICATION_WM_WINDOW_FOCUS_IN) {
|
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();
|
_check_for_external_edit();
|
||||||
|
} break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -772,7 +780,7 @@ ShaderEditor::ShaderEditor() {
|
|||||||
help_menu = memnew(MenuButton);
|
help_menu = memnew(MenuButton);
|
||||||
help_menu->set_text(TTR("Help"));
|
help_menu->set_text(TTR("Help"));
|
||||||
help_menu->set_switch_on_hover(true);
|
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));
|
help_menu->get_popup()->connect("id_pressed", callable_mp(this, &ShaderEditor::_menu_option));
|
||||||
|
|
||||||
add_child(main_container);
|
add_child(main_container);
|
||||||
|
|||||||
Reference in New Issue
Block a user