Skip to content

Sidebar list drops its left border edge so the window outline stays single-coated - #38

Merged
ghosthack merged 1 commit into
mainfrom
fix-sidebar-left-edge
Nov 30, 2026
Merged

ghosthack merged 1 commit into
mainfrom
fix-sidebar-left-edge

Conversation

@ghosthack

Copy link
Copy Markdown
Owner

A screenshot of the Sessions sidebar showed its left edge reading darker than the rest of the boundary: 47 gray beside the list against 25 gray everywhere else.

Cause: the sidebar sits flush against the window's left edge, where the platform composites the window's own one-pixel outline over the content. The session list's FlatLaf scroll border painted a second coat on those same pixels. Verified by pixel forensics on the screenshot, an offscreen FlatLaf paint probe, and the FlatLaf sources (its root-pane and native-window borders don't paint this edge on macOS).

Fix: with the focus decoration hidden (the default), the scroll pane gets a plain matte boundary with no left edge — a compound of an empty 1px left inset plus a top/right/bottom matte in the theme's border color. Insets stay (1,1,1,1), so viewport and divider geometry are unchanged; the divider's first pixel is single-coated too. The visible-focus-ring opt-out restores the stock FlatLaf border, and the matte refreshes with the other sidebar borders on theme switches.

Tests: SidebarScrollBorderTest pins the painted shape pixel by pixel; MainWindowSidebarBorderTest pins the installed border through a real window. Full suite green (654 tests).

…ingle-coated

The sidebar sits flush against the window's left edge, where the platform
composites the window's own one-pixel outline over the content. The session
list's FlatLaf scroll border painted a second coat on those same pixels, so
the list's left edge read darker (47 gray) than the boundary everywhere
else (25 gray).

With the focus decoration hidden (the default), the scroll pane now gets a
plain matte boundary with no left edge: a compound of an empty 1px left
inset and a top/right/bottom matte in the theme's border color. Insets stay
(1,1,1,1), so the viewport and divider geometry are unchanged, and the
top/bottom edges start one pixel in, leaving the divider's first pixel
single-coated too. Opting back into the visible focus ring restores the
stock FlatLaf border, and the matte refreshes with the other sidebar
borders on theme switches.

Tests: SidebarScrollBorderTest pins the painted shape pixel by pixel;
MainWindowSidebarBorderTest pins the installed border through a real
window.
@ghosthack
ghosthack force-pushed the fix-sidebar-left-edge branch from c783ec5 to e952659 Compare November 29, 2026 23:53
@ghosthack
ghosthack merged commit 2048397 into main Nov 30, 2026
3 checks passed
@ghosthack
ghosthack deleted the fix-sidebar-left-edge branch November 30, 2026 00:14
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