diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2022-07-26 11:08:29 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-26 11:08:29 +0200 |
commit | 6d57e209e91b8f564ed79b2cad6165dcd9edf196 (patch) | |
tree | 391f5b2e75ad475e063cb07bab608f182fbe84b7 /scene/gui/rich_text_label.h | |
parent | ba2cffc57568ce07c1fd8dcc34814fe791e1bee2 (diff) | |
parent | 94e5ad20199ee3738296a5fdd06d37c21e9cdcc7 (diff) |
Merge pull request #63482 from bruvzg/fix_rtl_theme_font_sizes
Diffstat (limited to 'scene/gui/rich_text_label.h')
-rw-r--r-- | scene/gui/rich_text_label.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/scene/gui/rich_text_label.h b/scene/gui/rich_text_label.h index c123f38c01..e5f0469c01 100644 --- a/scene/gui/rich_text_label.h +++ b/scene/gui/rich_text_label.h @@ -178,6 +178,7 @@ private: struct ItemFont : public Item { Ref<Font> font; + int font_size = 0; ItemFont() { type = ITEM_FONT; } }; @@ -462,8 +463,8 @@ private: Item *_find_indentable(Item *p_item); Item *_get_item_at_pos(Item *p_item_from, Item *p_item_to, int p_position); void _find_frame(Item *p_item, ItemFrame **r_frame, int *r_line); - int _find_font_size(Item *p_item); - Ref<Font> _find_font(Item *p_item); + ItemFontSize *_find_font_size(Item *p_item); + ItemFont *_find_font(Item *p_item); int _find_outline_size(Item *p_item, int p_default); ItemList *_find_list_item(Item *p_item); ItemDropcap *_find_dc_item(Item *p_item); @@ -518,7 +519,7 @@ public: void add_newline(); bool remove_line(const int p_line); void push_dropcap(const String &p_string, const Ref<Font> &p_font, int p_size, const Rect2 &p_dropcap_margins = Rect2(), const Color &p_color = Color(1, 1, 1), int p_ol_size = 0, const Color &p_ol_color = Color(0, 0, 0, 0)); - void push_font(const Ref<Font> &p_font); + void push_font(const Ref<Font> &p_font, int p_size = 0); void push_font_size(int p_font_size); void push_outline_size(int p_font_size); void push_normal(); |