Merge pull request #51866 from requizm/fix/49455
Fix `line_separation` working incorrectly in `RichTextLabel`
This commit is contained in:
commit
2daef0400a
3 changed files with 3 additions and 3 deletions
|
|
@ -1435,7 +1435,7 @@ void RichTextLabel::_notification(int p_what) {
|
|||
while (ofs.y < size.height && from_line < main->lines.size()) {
|
||||
visible_paragraph_count++;
|
||||
visible_line_count += _draw_line(main, from_line, ofs, text_rect.size.x, base_color, outline_size, outline_color, font_shadow_color, use_outline, shadow_ofs);
|
||||
ofs.y += main->lines[from_line].text_buf->get_size().y;
|
||||
ofs.y += main->lines[from_line].text_buf->get_size().y + get_theme_constant(SNAME("line_separation"));
|
||||
from_line++;
|
||||
}
|
||||
} break;
|
||||
|
|
|
|||
|
|
@ -917,7 +917,7 @@ void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, const
|
|||
theme->set_constant("shadow_offset_y", "RichTextLabel", 1 * scale);
|
||||
theme->set_constant("shadow_as_outline", "RichTextLabel", 0 * scale);
|
||||
|
||||
theme->set_constant("line_separation", "RichTextLabel", 1 * scale);
|
||||
theme->set_constant("line_separation", "RichTextLabel", 0 * scale);
|
||||
theme->set_constant("table_hseparation", "RichTextLabel", 3 * scale);
|
||||
theme->set_constant("table_vseparation", "RichTextLabel", 3 * scale);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue