summaryrefslogtreecommitdiffstats
path: root/editor
diff options
context:
space:
mode:
authorYuri Sizov <yuris@humnom.net>2021-10-02 23:06:14 +0300
committerYuri Sizov <yuris@humnom.net>2021-10-04 15:25:07 +0300
commit4a42a66cd92cbadac02bd1846ac4022dc8aaa44b (patch)
treed8e6031ec62835bae3ecd9561579a32610b94ea5 /editor
parent8aa78bc0501a37d7c1e81f0954ac5bd9b49f890f (diff)
downloadredot-engine-4a42a66cd92cbadac02bd1846ac4022dc8aaa44b.tar.gz
Add the base scale factor to the Theme resource
Diffstat (limited to 'editor')
-rw-r--r--editor/editor_themes.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/editor/editor_themes.cpp b/editor/editor_themes.cpp
index 0579fb4cbd..6efbcbc61e 100644
--- a/editor/editor_themes.cpp
+++ b/editor/editor_themes.cpp
@@ -292,7 +292,8 @@ void editor_register_and_generate_icons(Ref<Theme> p_theme, bool p_dark_theme =
Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
Ref<Theme> theme = Ref<Theme>(memnew(Theme));
- const float default_contrast = 0.3;
+ // Controls may rely on the scale for their internal drawing logic.
+ theme->set_default_theme_base_scale(EDSCALE);
// Theme settings
Color accent_color = EDITOR_GET("interface/theme/accent_color");
@@ -310,6 +311,8 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
Color preset_base_color;
float preset_contrast = 0;
+ const float default_contrast = 0.3;
+
// Please use alphabetical order if you're adding a new theme here
// (after "Custom")