microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
162.35k stars 28.6k forks source link

A white line at the top of the window on macOS Monterey #144389

Open Eureka-0 opened 2 years ago

Eureka-0 commented 2 years ago

Does this issue occur when all extensions are disabled?: Yes

Steps to Reproduce:

iShot2022-03-04 19 53 44

As long as the system is in light mode and vscode is in a dark theme, a white line will appear on the top of the vscode window. When the system switches to dark mode, it will disappear. This white line is really distracting. Hope you can fix this.

bpasero commented 2 years ago

Not sure whether this may be from our custom title or a general Electron / OS issue.

rzhao271 commented 2 years ago

The issue reproduces in Big Sur on the Insiders and Exploration builds, as well as on Electron Fiddle, but not Microsoft Edge.

deepak1556 commented 2 years ago

@rzhao271 can you try with vscode PWA application.

Eureka-0 commented 2 years ago
image

@rzhao271 can you try with vscode PWA application.

I installed vscode PWA application from chrome, and there seems to be no white line.

rzhao271 commented 2 years ago

I have confirmed the issue has been in Electron since version 9.

meadowsys commented 2 years ago

Can confirm. Also a few screenshots of how the borders look in light/dark mode, hoping they help (I think you can just about see the side borders):

image image

I noticed that in dark mode, it becomes more of a uniform border along the edge of the whole window, whereas in light mode, the borders on the side and bottom are almost gone, and the border on the top (wrapping around the rounded corners a little) are significantly brighter

hologerry commented 1 year ago

Upvote for solving this issue.

jhaemin commented 1 year ago

It's so annoying and catches my eyes every time I see the VSCode windows.

Maybe the issue is related to Electron and I think there are solutions for this.


~Here are some Electron apps that resolve the white top border. They have light (no white) border surrounding the window, or even without border.~

Here are some Electron apps that can toggle light/dark mode manually. And in dark mode (macOS light mode), they have light (no white) border surrounding the window which looks more natural.

Just like these apps, VSCode may fix this issue by applying dark mode border when using dark theme.

Cron (dark mode)

cron

Slack (dark mode)

slack

MongoDB Compass (dark mode)

compass

I'm not sure Figma is built on Electron, but they may resolve the issue by just removing the border like native apps. e.g.) Final Cut Pro, iTerm (screenshots below)

Figma

figma

I'm not sure Figma is built on Electron


Here are some Electron apps that also suffer from white top border like VSCode.

VSCode

vscode

Slack (light mode)

slack_light

GitKraken

gitkraken

Trello

trello

Notion

notion

Spark

spark

And lastly here are macOS native apps.

Clock

clock

Final Cut Pro

final_cut_pro

iTerm

iterm

KakaoTalk

kakaotalk
bpasero commented 1 year ago

I am trying to reproduce the behaviour but for me VS Code (1.79.x) seems to show the same border color, irrespective if my macOS theme is set to dark or light?

Here are my results in both OS themes:

Screenshot 2023-06-28 at 12 59 02 Screenshot 2023-06-28 at 12 59 19

This is with macOS ventura 13.4.1 (22F82)

jhaemin commented 1 year ago

That's weird. Here are what it looks like on my machine (27-inch, 4K). Are you using retina display? It looks like your screenshots are low resolutions. Maybe the antialiasing on your display makes the results look similar.

Light Mode

light

Dark Mode

dark
bpasero commented 1 year ago

I am on a Dell U2515H with a resolution of 2560x1440.