diff options
author | Eirik Aavitsland <eirik.aavitsland@qt.io> | 2022-05-31 09:50:45 +0200 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2022-05-31 22:21:55 +0000 |
commit | 04b9c31b0283ab4d305a8b72103e49c26749a182 (patch) | |
tree | e8ee14806767b8e5366878c575bf71c451448e7f /src/plugins/platformthemes/gtk3/qgtk3menu.cpp | |
parent | e9a0ff7bbde1d58371c75107d54bd5e4c044a74c (diff) |
Avoid menu separators disappearing under fractional dpr scaling
An aliased line painted directly on top of the top edge of the clip
rect will work fine when there is no scaling, since the coordinates
will snap downwards. When a fractional scaling is applied however, the
main part of the line width will sometimes fall outside the clip rect,
and so the coordinates will snap it outside, and hence it will not be
painted.
Fix by shifting the y coordinate by .5, to place the center coordinate
of the line to the center of the intended pixel.
Fixes: QTBUG-88934
Task-number: QTBUG-96223
Change-Id: I3ab042bc964eac6ce359d40428c4d79cde9cb78c
Reviewed-by: Nodir Temirkhodjaev <nodir.temir@gmail.com>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit b539dc118efb0a37826ac101b610f21483bf2498)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'src/plugins/platformthemes/gtk3/qgtk3menu.cpp')
0 files changed, 0 insertions, 0 deletions