summaryrefslogtreecommitdiffstats
path: root/editor/editor_settings_dialog.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'editor/editor_settings_dialog.cpp')
-rw-r--r--editor/editor_settings_dialog.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/editor/editor_settings_dialog.cpp b/editor/editor_settings_dialog.cpp
index 33a176499d..becc376cd4 100644
--- a/editor/editor_settings_dialog.cpp
+++ b/editor/editor_settings_dialog.cpp
@@ -38,12 +38,12 @@
#include "editor/editor_log.h"
#include "editor/editor_node.h"
#include "editor/editor_property_name_processor.h"
-#include "editor/editor_scale.h"
#include "editor/editor_settings.h"
#include "editor/editor_string_names.h"
#include "editor/editor_undo_redo_manager.h"
#include "editor/event_listener_line_edit.h"
#include "editor/input_event_configuration_dialog.h"
+#include "editor/themes/editor_scale.h"
#include "scene/gui/margin_container.h"
void EditorSettingsDialog::ok_pressed() {
@@ -62,8 +62,12 @@ void EditorSettingsDialog::_settings_changed() {
void EditorSettingsDialog::_settings_property_edited(const String &p_name) {
String full_name = inspector->get_full_item_path(p_name);
+ // Set theme presets to Custom when controlled settings change.
+
if (full_name == "interface/theme/accent_color" || full_name == "interface/theme/base_color" || full_name == "interface/theme/contrast" || full_name == "interface/theme/draw_extra_borders") {
- EditorSettings::get_singleton()->set_manually("interface/theme/preset", "Custom"); // set preset to Custom
+ EditorSettings::get_singleton()->set_manually("interface/theme/preset", "Custom");
+ } else if (full_name == "interface/theme/base_spacing" || full_name == "interface/theme/additional_spacing") {
+ EditorSettings::get_singleton()->set_manually("interface/theme/spacing_preset", "Custom");
} else if (full_name.begins_with("text_editor/theme/highlighting")) {
EditorSettings::get_singleton()->set_manually("text_editor/theme/color_theme", "Custom");
}