Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect scaling of native file picker #85898

Open
devsetgo opened this issue Dec 1, 2019 · 25 comments
Open

Incorrect scaling of native file picker #85898

devsetgo opened this issue Dec 1, 2019 · 25 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug confirmed Issue has been confirmed by VS Code Team member electron Issues and items related to Electron help wanted Issues identified as good community contribution opportunities upstream Issue identified as 'upstream' component related (exists outside of VS Code) upstream-issue-linked This is an upstream issue that has been reported upstream windows VS Code on Windows issues workbench-os-integration Native OS integration issues

Comments

@devsetgo
Copy link

devsetgo commented Dec 1, 2019

VS Code Version
Version: 1.40.2 (user setup)
Commit: f359dd6
Date: 2019-11-25T14:54:45.096Z
Electron: 6.1.5
Chrome: 76.0.3809.146
Node.js: 12.4.0
V8: 7.6.303.31-electron.0
OS: Windows_NT x64 10.0.19033

Steps to Reproduce:
Using a 4k display (mine is an XPS 15 7590 with OLED screen with 1080p extra monitor. This could be a windows problem, but I am not seeing it happen on other apps. Closest I have seen is when using Windows Explorer there is an awkward transition between 4k screen and normal screen.

Also notice VS Code is not correctly showing on non-4k screen. See image 4 below. The bottom of vs code is under taskbar. Changing task bar to top also doesn't seem to fit properly.

  1. File > Open Folder
  2. Open Folder Modal is really large on 1080p screen, but normal on 4k screen.

Screenshots

4k Screen img_1
4k Open Modal window img_2
1080p Modal window dragged over img_3_1080screen
1080p VS Code open modal on 1080 screen img_4_1080screen
Windows Version img_5

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

@bpasero bpasero added electron Issues and items related to Electron upstream Issue identified as 'upstream' component related (exists outside of VS Code) labels Dec 5, 2019
@bpasero bpasero removed their assignment Dec 5, 2019
@deepak1556
Copy link
Collaborator

Can you confirm if you see the same issue with 1.40.1 https://az764295.vo.msecnd.net/stable/8795a9889db74563ddd43eb0a897a2384129a619/VSCode-win32-x64-1.40.1.zip ? Thanks!

@devsetgo
Copy link
Author

devsetgo commented Dec 12, 2019

I tried on 1.40.2 and see the issue. I also still see the status bar extending past the Windows task bar.

vs_code_1_40_2
vs_code_1_40_2-2

Also, sorry for the delay in getting back to you. The SSD in my laptop died.

@deepak1556
Copy link
Collaborator

@devsetgo no problem, but can you try 1.40.1 mentioned above #85898 (comment) , want to confirm if its due to an electron update. Also how does it look with "window.titleBarStyle": "native" ?

This is most likely #85592

@devsetgo
Copy link
Author

devsetgo commented Dec 12, 2019

Open file dialog is still supersized in 1.40.1.

Adding "window.titleBarStyle": "native" fixes the behind the taskbar issue in both 1.40.1 ,1.40.2, and 1.41.0 (just upgraded).

Let me know what other tests you want to do.

@devsetgo
Copy link
Author

@deepak1556 is there any other tests you want me to try?

@devsetgo
Copy link
Author

Anything I can try, the issue is still there.

@elliott-w
Copy link

elliott-w commented Jan 22, 2021

I think I'm having the same issue.

I have a primary 1080p monitor scaled at 100% and a secondary 4k monitor scaled at 150%. When I open a file/folder in vscode on the secondary monitory, the file explorer assumes the scaling of the primary monitory which results in a tiny and hard to read file explorer.

Version: 1.52.1 (system setup)
Commit: ea3859d
Date: 2020-12-16T16:34:46.910Z
Electron: 9.3.5
Chrome: 83.0.4103.122
Node.js: 12.14.1
V8: 8.3.110.13-electron.0
OS: Windows_NT x64 10.0.18363

@yume-chan
Copy link
Contributor

Upstream issue: electron/electron#26622

@matthewtquinn1
Copy link

This is still an issue now with:

  • Version: 1.56.0.
  • Electron: 12.0.4

I'm running Windows 10 x64.

I've been seeing this issue now for almost a year: Happens on different machines, and I've fully reset these machines.

image

is there a fix for this?

@don-eng
Copy link

don-eng commented Aug 9, 2021

Still the same issue on 2021 Aug 09:

Version: 1.59.0 (user setup)
Commit: 379476f0e13988d90fab105c5c19e7abc8b1dea8
Date: 2021-08-04T23:13:12.822Z
Electron: 13.1.7
Chrome: 91.0.4472.124
Node.js: 14.16.0
V8: 9.1.269.36-electron.0
OS: Windows_NT x64 10.0.19043

@kwinz
Copy link

kwinz commented Nov 27, 2021

This is still not fixed. There are 10 different issues and duplicates that have all been closed by a bot after not being addressed for a few years.

Open File dialog is still opened tiny (or huge) if you have a multi monitor setup with different DPI. That's kind of a basic functionality for an editor, and multi monitor setups are prevalent for programmers. It breaks essential dialogs such as Open File and Save As. I am not sure why you are not pouring resources into this?

@devsetgo
Copy link
Author

This is still not fixed. There are 10 different issues and duplicates that have all been closed by a bot after not being addressed for a few years.

Open File dialog is still opened tiny (or huge) if you have a multi monitor setup with different DPI. That's kind of a basic functionality for an editor, and multi monitor setups are prevalent for programmers. It breaks essential dialogs such as Open File and Save As. I am not sure why you are not pouring resources into this?

I opened this originally and it was fixed for my issue.

@don-eng
Copy link

don-eng commented Nov 27, 2021 via email

@HoLengZai
Copy link

Any update on that issue please?

@redfrogred
Copy link

I am having same issue. (I run dual monitors, one 4k, one 1080p. The File Picker opens so small it is very difficult to use.)

@rzhao271 rzhao271 added the bug Issue identified by VS Code Team member as probable bug label Mar 17, 2022
@rzhao271 rzhao271 added this to the Backlog milestone Mar 17, 2022
@szekelyferencz
Copy link

szekelyferencz commented Sep 6, 2022

I'm having the same issue on HP Elitbook 830 G6 and an external LG "29 full hd monitor. The file picker it is huge

@svella-at-nice
Copy link

svella-at-nice commented Sep 22, 2022

For me, using VSCode 1,71,2 (Electron 19.0.12) the font is still about half the size it should be on my 30" 4K monitor, but I think it is better than it used to be because at least it is readable now, whereas it used to be too small to read. I wouldn't call it fixed yet.

@kwinz
Copy link

kwinz commented Sep 22, 2022

I just deleted a comment where I had erroneously claimed that it was fixed for me but it's actually not.

@kwinz
Copy link

kwinz commented Sep 30, 2022

Ok, I just updated to Windows 11 Version 21H2 (Build 22000.978) and now the file dialogs scale properly with VSC. This time for real. Still not a fix if you want to stay on Windows 10.

@Cirieno
Copy link

Cirieno commented Jan 24, 2023

This is still happening on 1.74.3.
I have two 4k screens (laptop @ 225% and monitor @ 175% scaling) and I think the file/folder dialog is picking the scaling from the primary screen (laptop) despite VSCode being opened on, and running on, the monitor.

@aont
Copy link

aont commented Jan 26, 2023

I found that I could reproduce the same problem with a simple code.

import win32api
import win32con
import ctypes

PROCESS_DPI_UNAWARE = 0
PROCESS_SYSTEM_DPI_AWARE = 1
PROCESS_PER_MONITOR_DPI_AWARE = 2

ctypes.windll.shcore.SetProcessDpiAwareness(PROCESS_PER_MONITOR_DPI_AWARE)

while True:
    if win32api.MessageBox(None, "test", "test", win32con.MB_YESNO) != win32con.IDYES:
        break

I thought this was a bug in the OS.

@jpduffield
Copy link

This is still occurring in 1.76.0.
The upstream Electron bug has been closed without a fix due to inactivity, and I can't re-raise it as VS Code is still using Electron v19 which is unsupported.

@AW14Saurabh
Copy link

About Page
Native screen of Dell Precision 5560
Dell P2217H monitor
This issue is still present, the native screen is 1920x1200p @ 145ppi, and the monitor is 1920x1080p @ 102ppi. The file picker looks broken on the second monitor.

@maks1798
Copy link

I found a workaround

I experienced this issue with vscode stable 1.83.1, electron 25.8.4

My native screen resolution is 2K, 150% scaling

Code.exe > Compatibility > Change High DPI settings > High DPI scaling override
Set this to System (Enhanced)

After this file explorer dialog started to appear with proper scaling.

I also tested it for 125% and 175% scaling and it worked too

image

image

image

@rzhao271 rzhao271 added this to the Backlog milestone Dec 7, 2023
@deepak1556 deepak1556 removed this from the Backlog milestone Dec 12, 2023
@deepak1556 deepak1556 added the help wanted Issues identified as good community contribution opportunities label Dec 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue identified by VS Code Team member as probable bug confirmed Issue has been confirmed by VS Code Team member electron Issues and items related to Electron help wanted Issues identified as good community contribution opportunities upstream Issue identified as 'upstream' component related (exists outside of VS Code) upstream-issue-linked This is an upstream issue that has been reported upstream windows VS Code on Windows issues workbench-os-integration Native OS integration issues
Projects
None yet
Development

No branches or pull requests