Skip to content

fix(ui): widen scrollbar thumbs, drop the line beside the editor's - #989

Merged
PathGao merged 1 commit into
masterfrom
fix/scrollbar-ruler-border
Oct 20, 2026
Merged

PathGao merged 1 commit into
masterfrom
fix/scrollbar-ruler-border

Conversation

@PathGao

@PathGao PathGao commented Oct 20, 2026

Copy link
Copy Markdown
Collaborator

What this is

Follows #978. @gooker said in #979 the scrollbars are still too thin, and the editor's scrollbar had a stray vertical line down its left edge. Both thumbs now rest at 8px and grow to 12px on a 14px track, and the line is gone.

Mechanism

Before #978 the editor set only verticalScrollbarSize: 10. Monaco defaults the slider size to the scrollbar size, so the thumb filled the track at 10px. #978 set verticalSliderSize: 6, which made the editor's resting thumb thinner than before. The preview went from 4px to 6px.

For reference, measured or read from source:

track thumb at rest thumb on hover
macOS overlay (NSScroller, drawn and measured) 17 6 11
Windows 11 (Chromium NativeThemeFluent) 15 9 9
VS Code default 14 14 14
#978 12 6 10
this PR 14 8 12

macOS can rest at 6px because its overlay bars hide when idle. Markpad's are always visible, so 8px sits between the Windows and macOS thumbs.

The line is the overview ruler's border. The ruler lies under the vertical scrollbar, and overviewRulerBorder defaults to true, drawing a 1px editorOverviewRuler.border line at its left edge. It is now off. The ruler's marks stay.

Verification

npm audit (0 vulnerabilities), npm run check (0 errors), npm test (1122 pass), npx vitest run (512 pass). In Chromium with Monaco 0.55.1, column 0 of the overview ruler canvas was painted on all 600 rows with the border on and on none with it off. The slider measured 8px at rest at left 3 and 12px when active at left 1 in the 14px track. The preview thumb is computed from the CSS (14px minus a 3px or 1px border on each side), not measured. Not checked in WKWebView or WebView2.

The editor's thumb filled its 10px track before #978 and rests at 6px
since, thinner than Windows' 9px. Both thumbs now rest at 8px and grow
to 12px on a 14px track. The overview ruler's border drew a 1px line
down the editor scrollbar's left edge, so it is off.
@PathGao
PathGao merged commit e52a966 into master Oct 20, 2026
4 checks passed
@PathGao
PathGao deleted the fix/scrollbar-ruler-border branch October 20, 2026 14:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant