diff options
author | Timur Pocheptsov <timur.pocheptsov@qt.io> | 2018-10-18 16:26:59 +0200 |
---|---|---|
committer | Timur Pocheptsov <timur.pocheptsov@qt.io> | 2018-10-19 13:03:43 +0000 |
commit | 0b4ab214db5f0368b33d4cfdfcaadf137070b7a8 (patch) | |
tree | cd74da62ec20fe500f0f3cc6de31ddfe3aac303b /src/plugins | |
parent | c18a91b0dc5e82c0624758a6300f561e36b968fc (diff) |
Fix a regression in qmacstyle
square/flat button had an erroneous size adjustment, resulting in a
wrong highlighted area. This button is anyway nothing like a real
control on macOS - they don't have 'flat' button which highlights
when pressed. Anyway, now our flat button looks more like AppKit's
'square' button when pressed.
Task-number: QTBUG-69533
Change-Id: I9643c1d4a25329c3f3c2148cc1821922655d9a8b
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/styles/mac/qmacstyle_mac.mm | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/styles/mac/qmacstyle_mac.mm b/src/plugins/styles/mac/qmacstyle_mac.mm index 2a21673054..1aab0309c9 100644 --- a/src/plugins/styles/mac/qmacstyle_mac.mm +++ b/src/plugins/styles/mac/qmacstyle_mac.mm @@ -1468,8 +1468,8 @@ QRectF QMacStylePrivate::CocoaControl::adjustedControlFrame(const QRectF &rect) QRectF frameRect; const auto frameSize = defaultFrameSize(); if (type == QMacStylePrivate::Button_SquareButton) { - frameRect = rect.adjusted(3, 1, -3, -5) - .adjusted(focusRingWidth, focusRingWidth, -focusRingWidth, -focusRingWidth); + frameRect = rect.adjusted(3, 1, -3, -1) + .adjusted(focusRingWidth, focusRingWidth, -focusRingWidth, -focusRingWidth); } else if (type == QMacStylePrivate::Button_PushButton) { // Start from the style option's top-left corner. frameRect = QRectF(rect.topLeft(), |