summaryrefslogtreecommitdiff
path: root/editor/editor_themes.cpp
diff options
context:
space:
mode:
authorFireForge <isaacr.7.2005@gmail.com>2022-03-03 18:19:00 -0600
committerFireForge <isaacr.7.2005@gmail.com>2022-03-04 15:27:50 -0600
commit6a4d3859cfe30bee542a9b9b98411be77f43c77f (patch)
tree3c164170eb9ae8054fa478d619f63fdf932472d8 /editor/editor_themes.cpp
parent3f69ea4f3bcb4f234f6e62909a79bdee221608a9 (diff)
Make EditorSpinSlider label color a theme property
Diffstat (limited to 'editor/editor_themes.cpp')
-rw-r--r--editor/editor_themes.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/editor/editor_themes.cpp b/editor/editor_themes.cpp
index 05aa638a4b..dcb56eb2e5 100644
--- a/editor/editor_themes.cpp
+++ b/editor/editor_themes.cpp
@@ -464,6 +464,14 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
theme->set_color("axis_y_color", "Editor", Color(0.53, 0.84, 0.01));
theme->set_color("axis_z_color", "Editor", Color(0.16, 0.55, 0.96));
+ const float prop_color_saturation = accent_color.get_s() * 0.75;
+ const float prop_color_value = accent_color.get_v();
+
+ theme->set_color("property_color_x", "Editor", Color().from_hsv(0.0 / 3.0 + 0.05, prop_color_saturation, prop_color_value));
+ theme->set_color("property_color_y", "Editor", Color().from_hsv(1.0 / 3.0 + 0.05, prop_color_saturation, prop_color_value));
+ theme->set_color("property_color_z", "Editor", Color().from_hsv(2.0 / 3.0 + 0.05, prop_color_saturation, prop_color_value));
+ theme->set_color("property_color_w", "Editor", Color().from_hsv(1.5 / 3.0 + 0.05, prop_color_saturation, prop_color_value));
+
theme->set_color("font_color", "Editor", font_color);
theme->set_color("highlighted_font_color", "Editor", font_hover_color);
theme->set_color("disabled_font_color", "Editor", font_disabled_color);
@@ -864,6 +872,10 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
theme->set_color("sub_inspector_property_color", "Editor", dark_theme ? Color(1, 1, 1, 1) : Color(0, 0, 0, 1));
theme->set_constant("sub_inspector_font_offset", "Editor", 4 * EDSCALE);
+ // EditorSpinSlider.
+ theme->set_color("label_color", "EditorSpinSlider", font_color);
+ theme->set_color("read_only_label_color", "EditorSpinSlider", font_readonly_color);
+
Ref<StyleBoxFlat> style_property_bg = style_default->duplicate();
style_property_bg->set_bg_color(highlight_color);
style_property_bg->set_border_width_all(0);