@Natanox @dbat The intended way is to change the Window.content_scale_factor, which works well for many things, e.g.
-
@Natanox @dbat The intended way is to change the Window.content_scale_factor, which works well for many things, e.g. styleboxes and fonts (cause those are rendered in a scalable way). But icons can't yet adapt. It's planned and hey, maybe it will actually be included in 4.4? But for now, if you care for icons, the best solution is to design your UI at a larger scale and then use a content_scale_factor of 0.5 or smaller on normal monitors.
You can get the DPI with DisplayServer.screen_get_dpi().
-
Natasha Nox πΊπ¦π΅πΈreplied to Jowan last edited by
-
Jowanreplied to Natasha Nox πΊπ¦π΅πΈ last edited by
@Natanox Well the settings of the main window are controlled via the project settings and the equivalent project setting is `display/window/stretch/scale`, but if you want to change it on the fly `get_window().content_scale_factor` is the way to go.
-
Natasha Nox πΊπ¦π΅πΈreplied to Jowan last edited by
@jowan Oh wait, I wasn't thinking properly last time. Of course we're currently in a function of the window class. In my head we were in some UI node.
Not exactly what I'm looking forβ¦ I get the feeling I'm just not versed enough in Godot to formulate anything more useful in this discussion right now. π€ Still, thank you!