diff options
Diffstat (limited to 'editor')
-rw-r--r-- | editor/editor_settings.cpp | 2 | ||||
-rw-r--r-- | editor/editor_themes.cpp | 5 |
2 files changed, 6 insertions, 1 deletions
diff --git a/editor/editor_settings.cpp b/editor/editor_settings.cpp index d2b87e63af..2e692452cc 100644 --- a/editor/editor_settings.cpp +++ b/editor/editor_settings.cpp @@ -571,6 +571,8 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) { set("interface/theme/preset", 0); hints["interface/theme/preset"] = PropertyInfo(Variant::INT, "interface/theme/preset", PROPERTY_HINT_ENUM, "Default,Grey,Godot 2,Arc,Light,Custom", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED); + set("interface/theme/icon_and_font_color", 0); + hints["interface/theme/icon_and_font_color"] = PropertyInfo(Variant::INT, "interface/theme/icon_and_font_color", PROPERTY_HINT_ENUM, "Auto,Dark,Light", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED); set("interface/theme/base_color", Color::html("#323b4f")); hints["interface/theme/highlight_color"] = PropertyInfo(Variant::COLOR, "interface/theme/highlight_color", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED); set("interface/theme/highlight_color", Color::html("#699ce8")); diff --git a/editor/editor_themes.cpp b/editor/editor_themes.cpp index a04cfed906..f09fe9d9ae 100644 --- a/editor/editor_themes.cpp +++ b/editor/editor_themes.cpp @@ -194,6 +194,7 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) { float contrast = EDITOR_DEF("interface/theme/contrast", default_contrast); int preset = EDITOR_DEF("interface/theme/preset", 0); + int icon_font_color_setting = EDITOR_DEF("interface/theme/icon_and_font_color", 0); bool highlight_tabs = EDITOR_DEF("interface/theme/highlight_tabs", false); int border_size = EDITOR_DEF("interface/theme/border_size", 1); @@ -226,7 +227,9 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) { } //Colors - bool dark_theme = ((base_color.r + base_color.g + base_color.b) / 3.0) < 0.5; + int AUTO_COLOR = 0; + int LIGHT_COLOR = 2; + bool dark_theme = (icon_font_color_setting == AUTO_COLOR && ((base_color.r + base_color.g + base_color.b) / 3.0) < 0.5) || icon_font_color_setting == LIGHT_COLOR; Color dark_color_1 = base_color.linear_interpolate(Color(0, 0, 0, 1), contrast); Color dark_color_2 = base_color.linear_interpolate(Color(0, 0, 0, 1), contrast * 1.5); |