summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZi Ye <major.mcdoom@gmail.com>2024-02-23 17:06:15 -0600
committerZi Ye <major.mcdoom@gmail.com>2024-02-25 14:42:48 -0600
commitea401f9853b3d84a77dfaedb9a5f7c286ec21d05 (patch)
tree64f5006bfd57d64dcff150af58dd486245bc6567
parent2e7fc81315bfa8d0a15f60adff2a12b6f3104236 (diff)
downloadredot-engine-ea401f9853b3d84a77dfaedb9a5f7c286ec21d05.tar.gz
Fixed the text editor theme not being applied on editor start.
-rw-r--r--editor/code_editor.cpp5
-rw-r--r--editor/plugins/script_editor_plugin.cpp4
-rw-r--r--editor/plugins/text_shader_editor.cpp4
3 files changed, 6 insertions, 7 deletions
diff --git a/editor/code_editor.cpp b/editor/code_editor.cpp
index d3872349e9..3efefe83c3 100644
--- a/editor/code_editor.cpp
+++ b/editor/code_editor.cpp
@@ -1059,7 +1059,6 @@ void CodeTextEditor::update_editor_settings() {
text_editor->set_line_length_guidelines(TypedArray<int>());
}
- _update_font_ligatures();
set_zoom_factor(zoom_factor);
}
@@ -1683,10 +1682,6 @@ void CodeTextEditor::goto_error() {
}
void CodeTextEditor::_update_text_editor_theme() {
- if (!EditorThemeManager::is_generated_theme_outdated()) {
- return;
- }
-
emit_signal(SNAME("load_theme_settings"));
error_button->set_icon(get_editor_theme_icon(SNAME("StatusError")));
diff --git a/editor/plugins/script_editor_plugin.cpp b/editor/plugins/script_editor_plugin.cpp
index 4a127e5d87..4d60ea225d 100644
--- a/editor/plugins/script_editor_plugin.cpp
+++ b/editor/plugins/script_editor_plugin.cpp
@@ -60,6 +60,7 @@
#include "editor/plugins/shader_editor_plugin.h"
#include "editor/plugins/text_shader_editor.h"
#include "editor/themes/editor_scale.h"
+#include "editor/themes/editor_theme_manager.h"
#include "editor/window_wrapper.h"
#include "scene/main/node.h"
#include "scene/main/window.h"
@@ -2787,7 +2788,8 @@ void ScriptEditor::_save_layout() {
}
void ScriptEditor::_editor_settings_changed() {
- if (!EditorSettings::get_singleton()->check_changed_settings_in_group("interface/editor") &&
+ if (!EditorThemeManager::is_generated_theme_outdated() &&
+ !EditorSettings::get_singleton()->check_changed_settings_in_group("interface/editor") &&
!EditorSettings::get_singleton()->check_changed_settings_in_group("text_editor") &&
!EditorSettings::get_singleton()->check_changed_settings_in_group("docks/filesystem")) {
return;
diff --git a/editor/plugins/text_shader_editor.cpp b/editor/plugins/text_shader_editor.cpp
index ad8674207b..c3bab0991e 100644
--- a/editor/plugins/text_shader_editor.cpp
+++ b/editor/plugins/text_shader_editor.cpp
@@ -37,6 +37,7 @@
#include "editor/filesystem_dock.h"
#include "editor/project_settings_editor.h"
#include "editor/themes/editor_scale.h"
+#include "editor/themes/editor_theme_manager.h"
#include "scene/gui/split_container.h"
#include "servers/rendering/shader_preprocessor.h"
#include "servers/rendering/shader_types.h"
@@ -740,7 +741,8 @@ void TextShaderEditor::_notification(int p_what) {
}
void TextShaderEditor::_editor_settings_changed() {
- if (!EditorSettings::get_singleton()->check_changed_settings_in_group("interface/editor") &&
+ if (!EditorThemeManager::is_generated_theme_outdated() &&
+ !EditorSettings::get_singleton()->check_changed_settings_in_group("interface/editor") &&
!EditorSettings::get_singleton()->check_changed_settings_in_group("text_editor")) {
return;
}