diff options
Diffstat (limited to 'scene/resources/default_theme/default_theme.cpp')
-rw-r--r-- | scene/resources/default_theme/default_theme.cpp | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/scene/resources/default_theme/default_theme.cpp b/scene/resources/default_theme/default_theme.cpp index 5bfa1adfe5..410f35e597 100644 --- a/scene/resources/default_theme/default_theme.cpp +++ b/scene/resources/default_theme/default_theme.cpp @@ -35,6 +35,7 @@ #include "default_theme_icons.gen.h" #include "scene/resources/font.h" #include "scene/resources/theme.h" +#include "scene/theme/theme_db.h" #include "servers/text_server.h" #include "modules/modules_enabled.gen.h" // For svg. @@ -1101,18 +1102,11 @@ void make_default_theme(float p_scale, Ref<Font> p_font, TextServer::SubpixelPos fill_default_theme(t, default_font, bold_font, bold_italics_font, italics_font, default_icon, default_style, default_scale); - Theme::set_default(t); - Theme::set_fallback_base_scale(default_scale); - Theme::set_fallback_icon(default_icon); - Theme::set_fallback_style(default_style); - Theme::set_fallback_font(default_font); - Theme::set_fallback_font_size(default_font_size * default_scale); -} + ThemeDB::get_singleton()->set_default_theme(t); -void clear_default_theme() { - Theme::set_project_default(nullptr); - Theme::set_default(nullptr); - Theme::set_fallback_icon(nullptr); - Theme::set_fallback_style(nullptr); - Theme::set_fallback_font(nullptr); + ThemeDB::get_singleton()->set_fallback_base_scale(default_scale); + ThemeDB::get_singleton()->set_fallback_icon(default_icon); + ThemeDB::get_singleton()->set_fallback_stylebox(default_style); + ThemeDB::get_singleton()->set_fallback_font(default_font); + ThemeDB::get_singleton()->set_fallback_font_size(default_font_size * default_scale); } |