Merge pull request #107347 from bruvzg/hr_hr_hr

[RTL] Decouple image width/height "in percent" properties. Add [hr] tag support.
This commit is contained in:
Rémi Verschelde
2025-06-13 01:30:47 +02:00
6 changed files with 181 additions and 24 deletions

View File

@ -1156,6 +1156,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);