diff options
author | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2021-07-06 10:57:19 +0200 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2021-07-19 13:30:27 +0000 |
commit | f209eb464cfa1a4f0f58640b59fd5c834c8bf7e0 (patch) | |
tree | 67bedde1517bd0474b77759eee9e0ee4bbe31292 /src/plugins | |
parent | 66c2f31ec950653e144ae76454775614b5391b81 (diff) |
macOS 10.15: Fix focus frame for combo boxes
Amends df316963213e765de5b94469622df48b0c9a9e6e to take care
of macOS 10.15 specifically, where the focus ring is a pixel
too high and leaves a gap that's visible on high-dpi displays.
On macOS 10.14 and before, and for editable comboboxes, the focus
frame is correct.
Fixes: QTBUG-94069
Change-Id: I278aa30036808c06f8e71385d4797315e46d8f1d
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
(cherry picked from commit eaa48136a39f153b05bb1842734bbe2277191510)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/styles/mac/qmacstyle_mac.mm | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/plugins/styles/mac/qmacstyle_mac.mm b/src/plugins/styles/mac/qmacstyle_mac.mm index 2030b47923..bb75391ab6 100644 --- a/src/plugins/styles/mac/qmacstyle_mac.mm +++ b/src/plugins/styles/mac/qmacstyle_mac.mm @@ -1233,6 +1233,8 @@ void QMacStylePrivate::drawFocusRing(QPainter *p, const QRectF &targetRect, int QRectF focusRect = targetRect; if (isBigSurOrAbove) focusRect.translate(0, -1.5); + else if (QOperatingSystemVersion::current() >= QOperatingSystemVersion::MacOSCatalina) + focusRect.adjust(0, 0, 0, -1); const qreal innerRadius = cw.type == Button_PushButton ? 3 : 4; const qreal outerRadius = innerRadius + focusRingWidth; hOffset = focusRect.left(); |