Fix documentation viewer to scroll to end
Extra `line separation` height was not taken into account when the offset for the different paragraphs (lines) was calculated.
This commit is contained in:
parent
b73e7623c8
commit
b54b0bc580
@ -366,7 +366,7 @@ void RichTextLabel::_resize_line(ItemFrame *p_frame, int p_line, const Ref<Font>
|
||||
}
|
||||
|
||||
if (p_line > 0) {
|
||||
l.offset.y = p_frame->lines[p_line - 1].offset.y + p_frame->lines[p_line - 1].text_buf->get_size().y;
|
||||
l.offset.y = p_frame->lines[p_line - 1].offset.y + p_frame->lines[p_line - 1].text_buf->get_size().y + get_theme_constant(SNAME("line_separation"));
|
||||
} else {
|
||||
l.offset.y = 0;
|
||||
}
|
||||
@ -614,7 +614,7 @@ void RichTextLabel::_shape_line(ItemFrame *p_frame, int p_line, const Ref<Font>
|
||||
*r_char_offset = l.char_offset + l.char_count;
|
||||
|
||||
if (p_line > 0) {
|
||||
l.offset.y = p_frame->lines[p_line - 1].offset.y + p_frame->lines[p_line - 1].text_buf->get_size().y;
|
||||
l.offset.y = p_frame->lines[p_line - 1].offset.y + p_frame->lines[p_line - 1].text_buf->get_size().y + get_theme_constant(SNAME("line_separation"));
|
||||
} else {
|
||||
l.offset.y = 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user