-
-
Notifications
You must be signed in to change notification settings - Fork 247
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
Platform UI scaling #200
Platform UI scaling #200
Conversation
…x max and min for safety, Use both height and width to calculate appropriate min and max for ui
Thanks! That change makes sense indeed.
What's currently missing? Isn't Also maybe this would fix #190, but hard to tell based on the non-existint issue description. |
@mbrlabs I meant that the scaling could more cohesive with the different desktop environments on linux (which dont manipulate the dpi when they scale). It would be better to scale based on what the system scale is rather than calculating the scale from the dpi, but that's not available. For OS.get_screen_dpi(), the dpi that X11 returns, can be off by like + or - 20 in my experience. Im also a bit worried about edge cases where a hidpi display return the default X11 dpi (96), but I don't know how often that happens. If the last point isn't a problem I also have this implementation: |
Ah i see, good to know. Well i guess the Godot editor workaround is pretty battle-tested, so id's say use that instead. Otherwise it's good to go. |
Thanks! |
Calculate UI auto scaling based on platform for more accurate scaling. Also wider range of allowed UI scales for some displays.
The scaling for Linux could probably be improved further, but will be much easier if Godot implements better scaling/dpi support in the engine itself.