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>
bb10
Timur Pocheptsov 2018-10-18 16:26:59 +02:00
parent c18a91b0dc
commit 0b4ab214db
1 changed files with 2 additions and 2 deletions

View File

@ -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(),