From 17901da1a8a3f8351524db9b415459c17a00c1eb Mon Sep 17 00:00:00 2001 From: Bojidar Marinov Date: Fri, 5 Jul 2019 23:32:52 +0300 Subject: Keep track of default theme and project custom default theme seperatelly Fixes #30288 --- scene/resources/theme.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'scene/resources/theme.h') diff --git a/scene/resources/theme.h b/scene/resources/theme.h index fb59073cbe..4c4f9b5aba 100644 --- a/scene/resources/theme.h +++ b/scene/resources/theme.h @@ -46,7 +46,6 @@ class Theme : public Resource { GDCLASS(Theme, Resource); RES_BASE_EXTENSION("theme"); - static Ref default_theme; void _emit_theme_changed(); HashMap > > icon_map; @@ -61,6 +60,8 @@ protected: bool _get(const StringName &p_name, Variant &r_ret) const; void _get_property_list(List *p_list) const; + static Ref project_default_theme; + static Ref default_theme; static Ref default_icon; static Ref default_style; static Ref default_font; @@ -137,6 +138,9 @@ public: static Ref get_default(); static void set_default(const Ref &p_default); + static Ref get_project_default(); + static void set_project_default(const Ref &p_default); + static void set_default_icon(const Ref &p_icon); static void set_default_style(const Ref &p_style); static void set_default_font(const Ref &p_font); -- cgit v1.2.3 From e0b5b218638df5b7b2998233182a7d8a1118e717 Mon Sep 17 00:00:00 2001 From: qarmin Date: Wed, 7 Aug 2019 12:54:30 +0200 Subject: Add some code changes/fixes proposed by Coverity and Clang Tidy --- scene/resources/theme.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scene/resources/theme.h') diff --git a/scene/resources/theme.h b/scene/resources/theme.h index 4c4f9b5aba..d27180e9eb 100644 --- a/scene/resources/theme.h +++ b/scene/resources/theme.h @@ -139,7 +139,7 @@ public: static void set_default(const Ref &p_default); static Ref get_project_default(); - static void set_project_default(const Ref &p_default); + static void set_project_default(const Ref &p_project_default); static void set_default_icon(const Ref &p_icon); static void set_default_style(const Ref &p_style); -- cgit v1.2.3 From 82b9557803f33521694587b6014645a05a814ecb Mon Sep 17 00:00:00 2001 From: IAmActuallyCthulhu Date: Sat, 10 Aug 2019 07:28:17 -0500 Subject: Remove redundant author doc comments --- scene/resources/theme.h | 3 --- 1 file changed, 3 deletions(-) (limited to 'scene/resources/theme.h') diff --git a/scene/resources/theme.h b/scene/resources/theme.h index d27180e9eb..187694de65 100644 --- a/scene/resources/theme.h +++ b/scene/resources/theme.h @@ -38,9 +38,6 @@ #include "scene/resources/style_box.h" #include "scene/resources/texture.h" -/** - @author Juan Linietsky -*/ class Theme : public Resource { GDCLASS(Theme, Resource); -- cgit v1.2.3