Selaa lähdekoodia

Reorganize Theme resource code for better maintainability

Yuri Sizov 4 vuotta sitten
vanhempi
commit
8aa78bc050
2 muutettua tiedostoa jossa 651 lisäystä ja 554 poistoa
  1. 646 553
      scene/resources/theme.cpp
  2. 5 1
      scene/resources/theme.h

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 646 - 553
scene/resources/theme.cpp


+ 5 - 1
scene/resources/theme.h

@@ -96,13 +96,17 @@ protected:
 	bool _get(const StringName &p_name, Variant &r_ret) const;
 	void _get_property_list(List<PropertyInfo> *p_list) const;
 
-	static Ref<Theme> project_default_theme;
+	// Universal Theme resources used when no other theme has the item.
 	static Ref<Theme> default_theme;
+	static Ref<Theme> project_default_theme;
+
+	// Universal default values, final fallback for every theme.
 	static Ref<Texture2D> default_icon;
 	static Ref<StyleBox> default_style;
 	static Ref<Font> default_font;
 	static int default_font_size;
 
+	// Default values configurable for each individual theme.
 	Ref<Font> default_theme_font;
 	int default_theme_font_size = -1;
 

Kaikkia tiedostoja ei voida näyttää, sillä liian monta tiedostoa muuttui tässä diffissä