Global UI scaling - HiDPI
|Reported by:||kallisti5||Owned by:||nobody|
|Keywords:||hidpi 4k dpi||Cc:|
|Blocked By:||Blocking:||#10157, #14463|
|Has a Patch:||no||Platform:||All|
The Haiku interface doesn't scale to higher DPI monitors like a lot of other modern operating systems.
MacOS and Gnome implement a "Global UI Scale" setting which scales up all parts of the UI. Since we rely on vector icons and other point based things, this should be a simple to moderate app_server change.
Pulkomandy outlined a few of the finer points here:
" Anyway for implementing this:
- We aleady have settings for font size, and Tracker icon sizes. Font sizes are in "points" for which there is not really a precise definition, so we can consider it an arbitrary unit. Tracker icon sizes are currently in pixels, and if there is extra scaling it would not actually be pixels anymore. Maybe we could rename the settings to "small, medium, large, huge" or similar.
- For the actual implementation: the drawing API has a SetScale and a SetTransform, both of which can be used to change the drawing size of everything. The idea would be to do this automatically when a view is created, and set a global scale (so, it's a little more work than adding a slider to the Appearance prefs).
- After doing this, expect to discover bugs because of interactions with other drawing primitives: saving to BPicture, applying more transforms, or using Clipping are likely to miss something and result in broken drawing.
An alternative to this approach (global scaling, similar to what macOS does), is to instead change just the font size (in Appearance prefs) and then make sure all apps properly scale their whole UI according to that. So if there is a large font, apps would also use larger icons, etc. This requires more work (as each app needs to be tweaked), but it is possibly simpler (no need to mess with the app_server drawing, transforms and clipping and stuff). " -- https://discuss.haiku-os.org/t/new-desktop-machine-4k-monitor/4411/4