From fc7cef8dec91f30e563ec1fac2b81c44f656a580 Mon Sep 17 00:00:00 2001 From: Yuri Sizov Date: Thu, 1 Sep 2022 18:52:49 +0300 Subject: Fix theme propagation in various parts of the editor --- scene/gui/rich_text_label.h | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) (limited to 'scene/gui/rich_text_label.h') diff --git a/scene/gui/rich_text_label.h b/scene/gui/rich_text_label.h index 79f9c62539..8bc28a9ecf 100644 --- a/scene/gui/rich_text_label.h +++ b/scene/gui/rich_text_label.h @@ -83,6 +83,7 @@ public: }; protected: + virtual void _update_theme_item_cache() override; void _notification(int p_what); static void _bind_methods(); @@ -512,6 +513,46 @@ private: bool fit_content_height = false; + struct ThemeCache { + Ref normal_style; + Ref focus_style; + Ref progress_bg_style; + Ref progress_fg_style; + + int line_separation; + + Ref normal_font; + int normal_font_size; + + Color default_color; + Color font_selected_color; + Color selection_color; + Color font_outline_color; + Color font_shadow_color; + int shadow_outline_size; + int shadow_offset_x; + int shadow_offset_y; + int outline_size; + Color outline_color; + + Ref bold_font; + int bold_font_size; + Ref bold_italics_font; + int bold_italics_font_size; + Ref italics_font; + int italics_font_size; + Ref mono_font; + int mono_font_size; + + int table_h_separation; + int table_v_separation; + Color table_odd_row_bg; + Color table_even_row_bg; + Color table_border; + + float base_scale = 1.0; + } theme_cache; + public: String get_parsed_text() const; void add_text(const String &p_text); -- cgit v1.2.3