Fix rendering of on-screen help texts for fractional scaling
Summary: In the review for 4e2f90a3 it was suggested to switch from `Text` to `Label` for the help texts of the rectangular selection screen. While this allowed to respect the system's colour scheme, there are two visual regressions compared to before that patch, in particular when fractional display scaling is active: With Qt 5.9 and earlier, the text becomes blurry. With Qt 5.11, the text gets an incorrect colour and is placed well outside of the containing box, making it totally unreadable. Both problems could be solved by switching to Qt Quick Controls 2 (introduced in Qt 5.7), where `Label` works better for fractional scaling. However, Spectacle depends only on Qt 5.6, and we are already past the dependency freeze. Therefore an alternative fix is applied: We go back to using `Text`, and set the text colour manually instead. Test Plan: `QT_SCALE_FACTOR=1.5 spectacle -r` should show sharp text at the right position, with colours adapted to the active colour scheme (e.g. Breeze Dark). Tested with Qt 5.6 and 5.11. Reviewers: #spectacle, ngraham Reviewed By: #spectacle, ngraham Subscribers: ngraham Differential Revision: https://phabricator.kde.org/D14254
parent
d1b558aa
Please register or sign in to comment