Skip to content

Conversation

@passivestar
Copy link
Member

Fixes the issue of poor visibility of scrollbars in the 2D viewport in the modern theme:

Before After
1 2

Modern theme uses styleboxes for scrollbars unlike classic theme that used images with transparent pixels. Until #111975 there was no way to add space between ScrollContainer content and its scrollbar without either using images with transparent pixels or relying on border hack which only worked with opaque colors, which made them look broken in the 2D viewport. This PR uses #111975 to remove the hack and make scrollbars semitransparent.

Note that although it's now possible to add inner scrollbar margins to scroll containers, I still had to add outer margins to the 2D viewport to separate them from the viewport edges, like it's done for all viewport overlays. This has a side effect of slightly larger margins in the classic theme due to transparent pixels in them:


If necessary the scrollbars in the classic theme can also be updated later to not rely on images while keeping their look.

@passivestar passivestar requested review from a team as code owners November 1, 2025 21:41
@YeldhamDev YeldhamDev added this to the 4.6 milestone Nov 1, 2025
@YeldhamDev
Copy link
Member

This introduces a quirk in both themes that now you can click between the scrollbar and the viewport margin, and that triggers a selection instead. It's nothing major, but something to keep in mind.

@passivestar passivestar marked this pull request as draft November 2, 2025 17:25
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.

2 participants