code-server icon indicating copy to clipboard operation
code-server copied to clipboard

UI scaling

Open djdisodo opened this issue 3 years ago • 19 comments

there is users using this on mobile device most of mobile browsers doesn't support scaling(in PC Ctrl+mWheel)

so it's nearly impossible to change ui size (for firefox about:config -> layout.css.devPixelsPerPx; systemwide)

can we add some feature to scale ui size?

djdisodo avatar Aug 27 '20 04:08 djdisodo

most of mobile browsers doesn't support scaling

Which browsers? Any browser that doesn't has a major accessibility issue.

iOS devices at least do support scaling.

nhooyr avatar Aug 29 '20 20:08 nhooyr

UI scaling is more of a browser side issue, you can just zoom out if needed since VS Code supports scaling by default.

sr229 avatar Aug 31 '20 02:08 sr229

@nhooyr i didn't know about ios @sr229 pinch to zoom works but how can i do when i want to make it smaller

like the screenshot here normal: https://ibb.co/dDdpHpc smaller: https://ibb.co/3zXFgNw

the ui size option in vscode seems not working here

djdisodo avatar Aug 31 '20 11:08 djdisodo

@nhooyr i didn't know about ios @sr229 pinch to zoom works but how can i do when i want to make it smaller

like the screenshot here normal: https://ibb.co/dDdpHpc smaller: https://ibb.co/3zXFgNw

the ui size option in vscode seems not working here

That's bound to a Electron API call IIRC, hence why it doesn't work.

sr229 avatar Sep 01 '20 01:09 sr229

though it is browser issue, i thnk it could be processed server side

djdisodo avatar Sep 01 '20 23:09 djdisodo

Unfortunately I don't have an android device so I can't comment further.

cc @code-asher might know.

nhooyr avatar Sep 02 '20 01:09 nhooyr

i'll test this (adding header) at home

https://stackoverflow.com/questions/9510359/set-size-of-html-page-and-browser-window

djdisodo avatar Sep 02 '20 04:09 djdisodo

adding this to header will just gonna work https://pastebin.com/fkaAPk4h 90%is just example

edit: not working cause it has hard-coded width, height controled by js

djdisodo avatar Sep 02 '20 09:09 djdisodo

On Firefox for Android at least there are options to scale according to the overall system but nothing to scale an individual website smaller.

As @sr229 mentioned the scaling in VS Code is Electron-based which is why it's missing but we could re-implement it with the CSS @djdisodo posted.

code-asher avatar Sep 02 '20 15:09 code-asher

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no activity occurs in the next 5 days.

stale[bot] avatar Oct 27 '21 02:10 stale[bot]

I use code-server a lot, when I resize code-server with browser scaling, it will also resize other windows on the host. Being able to resize inside code-server would be huge

bpmct avatar Nov 19 '21 23:11 bpmct

I wonder if this is an issue upstream. We'll have to investigate but from a quick check, seems like it works as expected on vscode.dev

2021-11-22 12 58 06

jsjoeio avatar Nov 22 '21 19:11 jsjoeio

Being able to leverage a code-server "zoom in+out" feature instead of the browser would be awesome.

Since the browser zoom carries over across all paths on the domain, https://mydomain.com/about and https://mydomain.com/code-server would have the same scaling which is not ideal.

Currently, the only option specific to code-server is the font, which does not carry over to the terminal or sidebar.

bpmct avatar Feb 13 '22 22:02 bpmct

Since the browser zoom carries over across all paths on the domain, https://mydomain.com/about and https://mydomain.com/code-server would have the same scaling which is not ideal.

Does the browser zoom setting carry across sub-domains also? If not, I might take the interim step of reconfiguring my code-servers to be at https://code-server.mydomain.com/ instead of https://mydomain.com/code-server

and-pete avatar Jun 18 '22 14:06 and-pete

Does the browser zoom setting carry across sub-domains also? If not, I might take the interim step of reconfiguring my code-servers to be at https://code-server.mydomain.com/ instead of https://mydomain.com/code-server

I just tested with netlify.com and app.netlify.com and it didn't so that should work!

jsjoeio avatar Jun 21 '22 14:06 jsjoeio

+1

I am facing the same issue on my phone. Adding an option to change UI scaling, either via an option in the editor or by modifying a config file before launch would be useful.

WaelShaikh avatar Sep 25 '22 08:09 WaelShaikh

UI scaling without using the browser zoom is necessary, especially for people who work on small screens. VScode stores it in user preferences under "window.zoomLevel": 1

navanshu avatar Dec 27 '22 07:12 navanshu

UI scaling without using the browser zoom is necessary, especially for people who work on small screens. VScode stores it in user preferences under "window.zoomLevel": 1

Please show me how to do that

Asher219 avatar Feb 05 '24 15:02 Asher219

window.zoomLevel seems disabled in code-server?

Are there any functioning workarounds for Android?

Other than system wide scaling I mean.

zeeyado avatar Feb 22 '24 16:02 zeeyado