[vlc-devel] Qt & fractionnal scaling

Steve Lhomme robux4 at ycbcr.xyz
Wed Feb 14 17:10:33 CET 2018


Le 14/02/2018 à 16:29, Pierre Lamot a écrit :
> Hello,
>
> Many user have reported issues with icons beeing too big on their system. The
> issue arise when their desktop is configured to use a fractionnal scaling.
>
> The main issue is that Qt reports an integral scale factor, so a scale factor
> of 1.25 is reported as 1,  1.75 -> 2 and 1.5 -> 2 which can make a big
> difference. This issue is known by Qt folks [1] but doesn't seems near to be
> resolved.

Cool, this bug will soon be 2 years old.

> I've been running some tests recently to try to work around this issue.
> Solutions I've been testing with so far:
>
>    * Keep the current behavior
>
>    * Patch Qt to provide a rounded  scale factor with preference for lower
> value, assuming that users will prefer smaller icons rather than lage ones.
>   
>    * Patch Qt to provide the real scale factor, this comes with some drawbacks
> the most noticeable beeing that some native widget are poorly rendered (esp
> checkbox and radio buttons)

Too complex and we'd have to maintain that.
>    * Manually detect system scale factor and force Qt scale. This should be
> done using plateform specific API since we need to modify QT environment and
> QDesktop can't be access before initialising Qt. This provides the same result
> and has the same drawbacks as previous solution.

If this workaround is inside our code (not patching the contrib) that 
could work.

>    * Provide a global scaling option (to change QT_SCALE_FACTOR), modifying
> QT_SCALE_FACTOR works well for icons and pixmap, but it tend to make fonts too
> big or too small, we also need to ensure that (desktop scale factor x qt scale
> factor >= 1) or qt rendering will be broken.
>
>    * Provide an icon scale option and scale every icons and pixmap according to
> this scale (before the DPI scaling). This provides flexibility, but it's a
> tedious task with probably many corner cases.
>
>   * Allow users to disable HiDPI scaling.

If that's not too much work I'd favor that. These users must have the 
same issue with other Qt apps anyway.

>
> Thank you for your opinion and suggestion on this matter.
>
> [1] https://bugreports.qt.io/browse/QTBUG-53022
>
> --
> Pierre Lamot
>
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel



More information about the vlc-devel mailing list