diff options
author | toger5 <toger5@hotmail.de> | 2017-08-30 21:19:06 +0200 |
---|---|---|
committer | toger5 <toger5@hotmail.de> | 2017-08-30 21:47:10 +0200 |
commit | ff0a149de94b723a6013fb224ec5a8d0bfada68d (patch) | |
tree | f949d885a893ad2625461aa0cb0ced409cca520b /editor/editor_themes.cpp | |
parent | 7793bfc544deb6517ca68c3e295eaba27bf74910 (diff) |
added setting for icon/font color: auto,dark,light
Diffstat (limited to 'editor/editor_themes.cpp')
-rw-r--r-- | editor/editor_themes.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
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); |