From ad5931ea280284b1487bc4ac915796815658781f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pa=CC=84vels=20Nadtoc=CC=8Cajevs?= <7645683+bruvzg@users.noreply.github.com> Date: Sat, 1 Nov 2025 23:22:40 +0200 Subject: [PATCH] [RTL] Do not apply scroll offset to empty RTL. --- scene/gui/rich_text_label.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/scene/gui/rich_text_label.cpp b/scene/gui/rich_text_label.cpp index e3959681624..da8467fc504 100644 --- a/scene/gui/rich_text_label.cpp +++ b/scene/gui/rich_text_label.cpp @@ -2422,10 +2422,6 @@ void RichTextLabel::_notification(int p_what) { queue_redraw(); } break; - case NOTIFICATION_READY: { - _prepare_scroll_anchor(); - } break; - case NOTIFICATION_THEME_CHANGED: { _stop_thread(); main->first_invalid_font_line.store(0); // Invalidate all lines. @@ -2598,7 +2594,12 @@ void RichTextLabel::_notification(int p_what) { } if (scroll_follow_visible_characters && scroll_active) { scroll_visible = follow_vc_pos > 0; - vscroll->set_visible(follow_vc_pos > 0); + if (scroll_visible) { + _prepare_scroll_anchor(); + } else { + scroll_w = 0; + } + vscroll->set_visible(scroll_visible); } if (has_focus() && get_tree()->is_accessibility_enabled()) { RID ae;