summaryrefslogtreecommitdiff
path: root/scene/gui
diff options
context:
space:
mode:
authorkobewi <kobewi4e@gmail.com>2022-01-19 14:26:31 +0100
committerkobewi <kobewi4e@gmail.com>2022-01-19 14:26:31 +0100
commit42c79161c26b1465cd83840978c09dd5bb46a5b4 (patch)
treefcce6f5725d04a832c9c54754b4729bc61867086 /scene/gui
parent468b987aa38b21b55c1cd8a8d4c03b8e1b2a1373 (diff)
Fix bottom line in editor log
Diffstat (limited to 'scene/gui')
-rw-r--r--scene/gui/rich_text_label.cpp12
1 files changed, 2 insertions, 10 deletions
diff --git a/scene/gui/rich_text_label.cpp b/scene/gui/rich_text_label.cpp
index 4588966d88..dec23a0f1c 100644
--- a/scene/gui/rich_text_label.cpp
+++ b/scene/gui/rich_text_label.cpp
@@ -2145,10 +2145,6 @@ void RichTextLabel::_validate_line_caches(ItemFrame *p_frame) {
}
// Resize lines without reshaping.
- Size2 size = get_size();
- if (fixed_width != -1) {
- size.width = fixed_width;
- }
Rect2 text_rect = _get_text_rect();
Ref<Font> base_font = get_theme_font(SNAME("normal_font"));
@@ -2169,7 +2165,7 @@ void RichTextLabel::_validate_line_caches(ItemFrame *p_frame) {
vscroll->set_max(total_height);
vscroll->set_page(text_rect.size.height);
if (scroll_follow && scroll_following) {
- vscroll->set_value(total_height - size.height);
+ vscroll->set_value(total_height);
}
updating_scroll = false;
@@ -2180,10 +2176,6 @@ void RichTextLabel::_validate_line_caches(ItemFrame *p_frame) {
}
// Shape invalid lines.
- Size2 size = get_size();
- if (fixed_width != -1) {
- size.width = fixed_width;
- }
Rect2 text_rect = _get_text_rect();
Ref<Font> base_font = get_theme_font(SNAME("normal_font"));
@@ -2206,7 +2198,7 @@ void RichTextLabel::_validate_line_caches(ItemFrame *p_frame) {
vscroll->set_max(total_height);
vscroll->set_page(text_rect.size.height);
if (scroll_follow && scroll_following) {
- vscroll->set_value(total_height - size.height);
+ vscroll->set_value(total_height);
}
updating_scroll = false;