Skip to content

Improve default scale factor selection

Adrian Vovk requested to merge AdrianVovk/mutter:fixup-scale-selection into main

I've redone Mutter's default scale factor selection. Instead of having the old rules that Mutter used to decide on a scale of 1.0/2.0, Mutter will now instead try its best to make the UI a certain size on screen. This should cover the intent of special cases you had (display too small for 2x scaling, large TV @ less than 4k won't have enough density, etc), and it should also allow Mutter to pick a fractional scale by default (if fractional scales are allowed). I picked a UI size of 150 DPI based on some of my subjective testing. In other words, that number means that the UI on screen should be as big as it would be on a display w/ a density of 150 DPI at 1x scaling. At this scale, the UI elements are about big as they are on my iPad and my Android phone, and my subjective opinion is that this is quite a natural size for the UI to be at. Of course, this is done on a best-effort basis: if the display cannot achieve this DPI, Mutter will pick the closest scale it can (for instance: a 23" 1080p display w/ a DPI of ~96 would have to be scaled at less than 1x to achieve a UI size DPI of 150, so the scale will end up being 1x and the UI will just be bigger on such a display)

I'm looking forward to your comments about this solution. I've tested it on my devices and it works great, but of course if it gets tested with more displays that would be better.

Part of #478

Edited by Adrian Vovk

Merge request reports