Improve UI scaling by crwood · Pull Request #199 · gridsync/gridsync
In response to #193, this PR attempts to address a number of UI scaling-related issues on high-DPI displays. In particular, it:
-
Enables Qt5's
AA_EnableHighDpiScaling/AA_UseHighDpiPixmapsattributes on Windows and macOS, thereby automatically upscaling window-sizes, font-sizes, and pixmap-sizes according to the underlying display's resolution/DPI. -
Explicitly sets font point-sizes throughout the codebase (seemingly a requirement for
AA_EnableHighDpiScalingto work properly) and automatically adjusts font point-sizes on macOS to match their equivalent Windows/Linux sizes -
Uses
SmoothTransformationwhen (re)scaling pixmaps, resulting in pixmaps that should appear less "blocky" or "pixelated" at higher resolutions.
As mentioned in this comment, however, some issues still remain on GNU/Linux, and so I've disabled AA_EnableHighDpiScaling/AA_UseHighDpiPixmaps there for now. See/follow Issue #198 for future progress relating to improving UI scaling on GNU/Linux.