Vscode: VSCode is blurry on Chrome OS with scaling

Created on 30 Nov 2018  路  10Comments  路  Source: microsoft/vscode

The below screenshot is running on an external monitor connected to the Pixelbook. It is set to scale to 130%

The Desktop PWA (progressive web app) Twitter running in Chrome is scaled nicely, but VSCode is not.

screenshot 2018-11-28 at 11 55 21

As can be read in https://www.reddit.com/r/Crostini/wiki/howto/adjust-display-scaling Linux/Crostini apps in CrOS (Chrome OS) are scaled by sommelier, which I assume scaled the resulting window.

The proper solution is to not scale the window content, but give the scale factor to Electron, as Electron embeds Chrome which can paint at the right scale via Skia. Chrome additionally exposes this as window.devicePixelRatio which means that at higher DRP (device pixel ratio) it can use images of higher resolution.

screenshot 2018-11-28 at 12 02 08

Electron on Linux additionally uses GTK+ but I assume that GTK as well has a way to paint at the right resolution.

The question is how to make sure that VSCode is not being scaled by sommelier on CrOS and how it should get the scale (also when it changes or window is moved from one display to the other).

*out-of-scope electron upstream

Most helpful comment

VSCode is still very blurry on my 4k monitor hooked up to a Pixelbook, whether using low-density or high-density. Please reopen this.

All 10 comments

(Experimental duplicate detection)
Thanks for submitting this issue. Please also check if it is already covered by an existing one, like:

Some info about GTK DPI adjustment: https://wiki.gnome.org/HowDoI/HiDpi

Actually experimenting I get pretty good results using

GDK_SCALE=2 sommelier -X --scale=2 --dpi=208 /usr/share/code/code

The DPI is calculated as "160 * 1.3" as devicePixelRatio 1 equals a DPI of 160 and I am using a scale of 1.3%. Not sure this is the right way of doing it and this is all be detected automatically anyways

I wrote a mini medium article on how to work around this issue:
https://medium.com/@kennethrohde/sharp-looking-vscode-on-chrome-os-e8edf7c1411d

We are building exploration builds that use a much newer version of Electron (our UI framework). I wonder if this issue reproduces with one of these builds, could you try? Download:

@bpasero Code Exploration is just as blurry

image

Is there a link to the upstream electron issue?

Sir, But How can you make it permanent, when I restart visual studio code it reverts.

This issue is being closed to keep the number of issues in our inbox on a manageable level, we are closing issues that are not going to be addressed in the foreseeable future: We look at the number of votes the issue has received and the number of duplicate issues filed. More details here. If you disagree and feel that this issue is crucial: We are happy to listen and to reconsider.

If you wonder what we are up to, please see our roadmap and issue reporting guidelines.

Thanks for your understanding and happy coding!

VSCode is still very blurry on my 4k monitor hooked up to a Pixelbook, whether using low-density or high-density. Please reopen this.

Was this page helpful?
0 / 5 - 0 ratings