[Development] [HiDPI] Rethinking the scaling algorithm

Allan Sandfeld Jensen kde at carewolf.com
Wed Nov 9 23:25:41 CET 2016


On Wednesday 09 November 2016, Niccolò Belli wrote:
> On martedì 8 novembre 2016 23:02:04 CET, Thiago Macieira wrote:
> > Agreed we need to adjust the formula. I'm not sure a full round
> > down (i.e., an
> > integer division) is what we want. Another option is
> > 
> > 	qRound(dpi / 96.0 - 0.75);
> > 
> > That would make:
> > 	DPI < 168	1x
> > 	DPI < 264	2x
> > 
> > etc.
> 
> I suggested a full round down because it mimics the behaviour of GTK3,
> which seems to work pretty well for them:
> https://wiki.gnome.org/HowDoI/HiDpi
> Anyway anythink else will probably work better than the current
> implementation which is simply broken and must be changed ASAP.
> 
GTK has only just recently implemented HiDPI, much much later than Qt. What 
makes you think it is "working well for them"?

Since most of the common configuration of HiDPI screens are following Mac 
standards, they have been designed to work at 2x scaling with 72DPI. We can 
not ignore all the Apple style screens out there like 4k 27" screen for 
instance. Which are specifically designed for 2x scaling. 144DPI must cause 2x 
scaling to follow what most HiDPI hardware have been designed for.

What we need is a better tool and configuration for high-DPI tablets, phones 
and hybrids where the ideal virtual DPI is not 72 or 96 DPI.

`Allan



More information about the Development mailing list