From 4a42a66cd92cbadac02bd1846ac4022dc8aaa44b Mon Sep 17 00:00:00 2001 From: Yuri Sizov Date: Sat, 2 Oct 2021 23:06:14 +0300 Subject: Add the base scale factor to the Theme resource --- editor/editor_themes.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'editor') 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 p_theme, bool p_dark_theme = Ref create_editor_theme(const Ref p_theme) { Ref theme = Ref(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 create_editor_theme(const Ref 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") -- cgit v1.2.3