[RTL] Decouple image width/height "in percent" properties. Add [hr] tag support.

This commit is contained in:
Pāvels Nadtočajevs
2025-06-09 23:29:49 +03:00
parent fc523ec5f6
commit a262747cdf
6 changed files with 181 additions and 24 deletions

View File

@ -1154,6 +1154,12 @@ void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, const
theme->set_stylebox("focus", "RichTextLabel", focus);
theme->set_stylebox(CoreStringName(normal), "RichTextLabel", make_empty_stylebox(0, 0, 0, 0));
Ref<Image> solid_img = Image::create_empty(2, 2, false, Image::FORMAT_RGBA8);
solid_img->fill(Color(1, 1, 1, 1));
Ref<Texture2D> solid_icon = ImageTexture::create_from_image(solid_img);
theme->set_icon("horizontal_rule", "RichTextLabel", solid_icon);
theme->set_font("normal_font", "RichTextLabel", Ref<Font>());
theme->set_font("bold_font", "RichTextLabel", bold_font);
theme->set_font("italics_font", "RichTextLabel", italics_font);