X Tutup
Skip to content

Allow to add padding to ScrollBars#112441

Merged
Repiteo merged 1 commit intogodotengine:masterfrom
YeldhamDev:scrollbar_padding
Nov 14, 2025
Merged

Allow to add padding to ScrollBars#112441
Repiteo merged 1 commit intogodotengine:masterfrom
YeldhamDev:scrollbar_padding

Conversation

@YeldhamDev
Copy link
Member

Screenshot_20251105_111758

(A comparison between the default scrollbar and one with left/right padding plus top/bottom content margins in the scroll theme element)

This PR adds a set of padding_* theme constants with all four directions, with the horizontal ones being used for VScrollBar, and the vertical ones for HScrollBar.
This inversely mirrors the behavior of the content margins in the scroll theme element, where the horizontal margins are present in HScrollBar, and the vertical ones in are in VScrollBar.

Helps address #112296 (comment).

But why not just change it so that all content margins add padding?

Because that would result in a compatibility break, as some users make use of them to increase the minimum size. Even the Godot editor and the default project theme make use of them for that.

@YeldhamDev YeldhamDev added this to the 4.6 milestone Nov 5, 2025
@YeldhamDev YeldhamDev requested review from a team as code owners November 5, 2025 15:48
Copy link
Contributor

@passivestar passivestar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested, works as expected. Not sure about the UX of setting horizontal and vertical paddings in different places but I guess it can be changed in godot 5 if there's no other way

@akien-mga akien-mga requested a review from KoBeWi November 7, 2025 15:30
@YeldhamDev
Copy link
Member Author

Changes made.

@Repiteo Repiteo merged commit 2cd268f into godotengine:master Nov 14, 2025
20 checks passed
@Repiteo
Copy link
Contributor

Repiteo commented Nov 14, 2025

Thanks!

@YeldhamDev YeldhamDev deleted the scrollbar_padding branch November 14, 2025 06:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

X Tutup