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>bb10
parent
7ae1dcbb04
commit
3857f104ca
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in New Issue