1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-08 12:40:44 +00:00

Fix editor progress dialog theme update.

This commit is contained in:
bruvzg
2023-01-14 00:24:29 +02:00
parent 4c5e09f96a
commit 026002859b

View File

@@ -584,10 +584,11 @@ void EditorNode::_notification(int p_what) {
case NOTIFICATION_ENTER_TREE: { case NOTIFICATION_ENTER_TREE: {
Engine::get_singleton()->set_editor_hint(true); Engine::get_singleton()->set_editor_hint(true);
Window *window = static_cast<Window *>(get_tree()->get_root()); Window *window = get_window();
if (window) { if (window) {
// Handle macOS fullscreen and extend-to-title changes. // Handle macOS fullscreen and extend-to-title changes.
window->connect("titlebar_changed", callable_mp(this, &EditorNode::_titlebar_resized)); window->connect("titlebar_changed", callable_mp(this, &EditorNode::_titlebar_resized));
window->set_theme(theme);
} }
OS::get_singleton()->set_low_processor_usage_mode_sleep_usec(int(EDITOR_GET("interface/editor/low_processor_mode_sleep_usec"))); OS::get_singleton()->set_low_processor_usage_mode_sleep_usec(int(EDITOR_GET("interface/editor/low_processor_mode_sleep_usec")));
@@ -695,6 +696,7 @@ void EditorNode::_notification(int p_what) {
theme_base->set_theme(theme); theme_base->set_theme(theme);
gui_base->set_theme(theme); gui_base->set_theme(theme);
get_window()->set_theme(theme);
gui_base->add_theme_style_override("panel", gui_base->get_theme_stylebox(SNAME("Background"), SNAME("EditorStyles"))); gui_base->add_theme_style_override("panel", gui_base->get_theme_stylebox(SNAME("Background"), SNAME("EditorStyles")));
scene_root_parent->add_theme_style_override("panel", gui_base->get_theme_stylebox(SNAME("Content"), SNAME("EditorStyles"))); scene_root_parent->add_theme_style_override("panel", gui_base->get_theme_stylebox(SNAME("Content"), SNAME("EditorStyles")));