summaryrefslogtreecommitdiffstats
path: root/src/plugins/styles
diff options
context:
space:
mode:
authorTimur Pocheptsov <timur.pocheptsov@qt.io>2020-10-26 16:12:41 +0100
committerTimur Pocheptsov <timur.pocheptsov@qt.io>2020-10-28 05:54:57 +0100
commit3857f104cac127f62e64e55a20613f0ac2e6b843 (patch)
treebcd3eb00d443e6e43c162d3bced8ec7ee6f9b28d /src/plugins/styles
parent7ae1dcbb04dd6e742de6331bec1be8ccf2e3bb47 (diff)
QMacStyle - more pixel refinements
There is 1 pixel of a rounded corner visible both on NSButton and NSPopupButton in a tab widget (all orientations) - adjust the rectangle for this. Pick-to: 5.15 Pick-to: 5.12 Task-number: QTBUG-86513 Change-Id: I5e203adc583d2fba6323b18328ccbc8b0c0666ea Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Diffstat (limited to 'src/plugins/styles')
-rw-r--r--src/plugins/styles/mac/qmacstyle_mac.mm18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/plugins/styles/mac/qmacstyle_mac.mm b/src/plugins/styles/mac/qmacstyle_mac.mm
index 8fac7a4277..34568ee44a 100644
--- a/src/plugins/styles/mac/qmacstyle_mac.mm
+++ b/src/plugins/styles/mac/qmacstyle_mac.mm
@@ -3875,9 +3875,22 @@ void QMacStyle::drawControl(ControlElement ce, const QStyleOption *opt, QPainter
frameRect = frameRect.adjusted(-innerAdjust, 0, outerAdjust, 0);
else
frameRect = frameRect.adjusted(-outerAdjust, 0, innerAdjust, 0);
+
+ if (isSelected && isBigSurOrAbove) {
+ // 1 pixed of 'roundness' is still visible on the right
+ // (the left is OK, it's rounded).
+ frameRect = frameRect.adjusted(0, 0, 1, 0);
+ }
+
break;
case QStyleOptionTab::Middle:
frameRect = frameRect.adjusted(-innerAdjust, 0, innerAdjust, 0);
+
+ if (isSelected && isBigSurOrAbove) {
+ // 1 pixel of 'roundness' is still visible on both
+ // sides - left and right.
+ frameRect = frameRect.adjusted(-1, 0, 1, 0);
+ }
break;
case QStyleOptionTab::End:
// Pressed state hack: tweak adjustments in preparation for flip below
@@ -3885,6 +3898,11 @@ void QMacStyle::drawControl(ControlElement ce, const QStyleOption *opt, QPainter
frameRect = frameRect.adjusted(-innerAdjust, 0, outerAdjust, 0);
else
frameRect = frameRect.adjusted(-outerAdjust, 0, innerAdjust, 0);
+
+ if (isSelected && isBigSurOrAbove) {
+ // 1 pixel of 'roundness' is still visible on the left.
+ frameRect = frameRect.adjusted(-1, 0, 0, 0);
+ }
break;
case QStyleOptionTab::OnlyOneTab:
frameRect = frameRect.adjusted(-outerAdjust, 0, outerAdjust, 0);