How to handle windows zoom? #5891
-
First Check
Example Code-DescriptionWe noticed that some users are using windows zoom of 125/150%, the question is, is it just scalable with a responsive layout or are there some naitive tipps and tricks to force 100%? NiceGUI Version3.8 Python Version3.13 BrowserChrome Operating SystemWindows Additional ContextNo response |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
Hi @phifuh, This is a general web/browser topic rather than something NiceGUI-specific. Since NiceGUI renders in a browser (or webview), Windows display scaling (125%, 150%) affects your app the same way it affects any website. The recommended approach is responsive design:
Forcing 100% zoom is not recommended (and largely not possible):
In short: if your layout breaks at 125%/150%, that's a sign it relies on fixed pixel sizes. Switching to relative/responsive units is the proper fix and will make your app work well at any zoom level. |
Beta Was this translation helpful? Give feedback.
Hi @phifuh,
Since I'm not familiar with Windows and its zoom setting, I asked Claude about it:
This is a general web/browser topic rather than something NiceGUI-specific. Since NiceGUI renders in a browser (or webview), Windows display scaling (125%, 150%) affects your app the same way it affects any website.
The recommended approach is responsive design:
rem,%,fr) instead of fixed pixel values.Forcing 100% zoom is not recommended (and largely not possible):