summaryrefslogtreecommitdiff
path: root/scene/gui/rich_text_label.h
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2022-09-02 13:51:52 +0200
committerRémi Verschelde <rverschelde@gmail.com>2022-09-02 13:51:52 +0200
commitfe2cf6e406a0dfc02516ac3d03911d8863f0dce4 (patch)
treef3dadf1a6c2acb4c67e9fbc51d3512b5dcb125de /scene/gui/rich_text_label.h
parentef34c411db6f6f09cf5c98b4e7a0fc565a8f3b4c (diff)
parentfc7cef8dec91f30e563ec1fac2b81c44f656a580 (diff)
Merge pull request #65210 from YuriSizov/control-customizable-cache-p3
Diffstat (limited to 'scene/gui/rich_text_label.h')
-rw-r--r--scene/gui/rich_text_label.h41
1 files changed, 41 insertions, 0 deletions
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<StyleBox> normal_style;
+ Ref<StyleBox> focus_style;
+ Ref<StyleBox> progress_bg_style;
+ Ref<StyleBox> progress_fg_style;
+
+ int line_separation;
+
+ Ref<Font> 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<Font> bold_font;
+ int bold_font_size;
+ Ref<Font> bold_italics_font;
+ int bold_italics_font_size;
+ Ref<Font> italics_font;
+ int italics_font_size;
+ Ref<Font> 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);