Skip to content

Conversation

@Grovvik
Copy link

@Grovvik Grovvik commented Jan 6, 2026

Fixes #162995

Description

This PR addresses the visual misalignment of status bar items. Previously, icons and text appeared slightly shifted downwards (by approx 1px) relative to the container's optical center.

Root Cause

The status bar container includes a border-top. While flexbox mathematically centers items within the container (height including border), the visual content area is actually the height minus the border. This caused the items to look "heavy" at the bottom.

Solution

I've adjusted the CSS to compensate for the top border, ensuring items are optically centered within the effective viewing area.

Screenshots

chrome_7kAFvZwhR9

Verification

  1. Open VS Code.
  2. Zoom in (Ctrl/Cmd + +) to verify the alignment of status bar items (e.g., Git branch, encoding, cursor position).
  3. Check in both Light and Dark themes.

@vs-code-engineering
Copy link

📬 CODENOTIFY

The following users are being notified based on files changed in this PR:

@bpasero

Matched files:

  • src/vs/workbench/browser/parts/statusbar/media/statusbarpart.css

Copy link
Member

@bpasero bpasero left a comment

Choose a reason for hiding this comment

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

This does not seem to improve the UX at all on macOS:

Image

@Grovvik
Copy link
Author

Grovvik commented Jan 7, 2026

Thanks! Could you share a before/after comparison on macOS? The misalignment was visible on Windows in browser, but it might be platform-specific. Happy to adjust if needed!

@bpasero
Copy link
Member

bpasero commented Jan 7, 2026

Here is a before on macOS:

image

@Grovvik
Copy link
Author

Grovvik commented Jan 7, 2026

Thanks for the screenshots, that really helps!
I'll dive into the CSS to see if I can find a solution that works consistent across all platforms (or target specific platforms if necessary). I will update the PR once I have a better approach.

@Grovvik Grovvik requested a review from bpasero January 7, 2026 12:29
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.

Improve vertical alignment of text and icons in status bar

3 participants