You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-09 12:50:35 +00:00
Merge pull request #22770 from Chaosus/fix_inspector_theme
Fix inspector color when theme changed
This commit is contained in:
@@ -2139,6 +2139,13 @@ void EditorInspector::_notification(int p_what) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (p_what == EditorSettings::NOTIFICATION_EDITOR_SETTINGS_CHANGED) {
|
if (p_what == EditorSettings::NOTIFICATION_EDITOR_SETTINGS_CHANGED) {
|
||||||
|
|
||||||
|
if (use_sub_inspector_bg) {
|
||||||
|
add_style_override("bg", get_stylebox("sub_inspector_bg", "Editor"));
|
||||||
|
} else if (is_inside_tree()) {
|
||||||
|
add_style_override("bg", get_stylebox("bg", "Tree"));
|
||||||
|
}
|
||||||
|
|
||||||
update_tree();
|
update_tree();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -328,6 +328,21 @@ Container *InspectorDock::get_addon_area() {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void InspectorDock::_notification(int p_what) {
|
||||||
|
switch (p_what) {
|
||||||
|
case EditorSettings::NOTIFICATION_EDITOR_SETTINGS_CHANGED: {
|
||||||
|
set_theme(editor->get_gui_base()->get_theme());
|
||||||
|
resource_new_button->set_icon(get_icon("New", "EditorIcons"));
|
||||||
|
resource_load_button->set_icon(get_icon("Load", "EditorIcons"));
|
||||||
|
backward_button->set_icon(get_icon("Back", "EditorIcons"));
|
||||||
|
forward_button->set_icon(get_icon("Forward", "EditorIcons"));
|
||||||
|
history_menu->set_icon(get_icon("History", "EditorIcons"));
|
||||||
|
object_menu->set_icon(get_icon("Tools", "EditorIcons"));
|
||||||
|
warning->set_icon(get_icon("NodeWarning", "EditorIcons"));
|
||||||
|
} break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void InspectorDock::_bind_methods() {
|
void InspectorDock::_bind_methods() {
|
||||||
ClassDB::bind_method("_menu_option", &InspectorDock::_menu_option);
|
ClassDB::bind_method("_menu_option", &InspectorDock::_menu_option);
|
||||||
|
|
||||||
|
|||||||
@@ -118,6 +118,7 @@ class InspectorDock : public VBoxContainer {
|
|||||||
|
|
||||||
protected:
|
protected:
|
||||||
static void _bind_methods();
|
static void _bind_methods();
|
||||||
|
void _notification(int p_what);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
void go_back();
|
void go_back();
|
||||||
|
|||||||
Reference in New Issue
Block a user