Skip to content

Fix RichTextLabel scrollbar when too small to show it#116390

Merged
Repiteo merged 1 commit into
godotengine:masterfrom
kitbdev:fix-rtl-too-small-for-scrollbar
Feb 20, 2026
Merged

Fix RichTextLabel scrollbar when too small to show it#116390
Repiteo merged 1 commit into
godotengine:masterfrom
kitbdev:fix-rtl-too-small-for-scrollbar

Conversation

@kitbdev

@kitbdev kitbdev commented Feb 17, 2026

Copy link
Copy Markdown
Contributor

When the RTL is too small to show the scrollbar, it isn't handled well, and the scollbar may be visible or not. When changing the size it flickers.

Before:

rtl-scrollbar-small-handling.mp4

After:

rtl-scrollbar-small-handling-fix.mp4

It also had issues when in a BoxContainer and it was too small to show, such as the script editor's error text at minimum width. It was escaping the BoxContainer rect.

Before (depending on the speed you do it, this is if you minimize it slowly):
Screenshot 2026-02-15 221657

After:
Screenshot 2026-02-16 185730

Now the scrollbar just doesn't show if too small.
This check prevents p_width - scroll_w from being 0 or less which caused issues.

@kitbdev kitbdev added this to the 4.x milestone Feb 17, 2026
@kitbdev kitbdev requested a review from a team as a code owner February 17, 2026 00:11
Comment thread scene/gui/rich_text_label.cpp Outdated
@kitbdev kitbdev force-pushed the fix-rtl-too-small-for-scrollbar branch from 3e69b9d to a98f695 Compare February 19, 2026 00:53
@Repiteo Repiteo modified the milestones: 4.x, 4.7 Feb 20, 2026
@Repiteo Repiteo merged commit aa094e9 into godotengine:master Feb 20, 2026
20 checks passed
@Repiteo

Repiteo commented Feb 20, 2026

Copy link
Copy Markdown
Contributor

Thanks!

@kitbdev kitbdev deleted the fix-rtl-too-small-for-scrollbar branch February 20, 2026 20:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

3 participants