summaryrefslogtreecommitdiffstats
path: root/src/plugins/styles/mac/qmacstyle_mac.mm
diff options
context:
space:
mode:
authorQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2020-05-04 11:33:10 +0200
committerAlexandru Croitor <alexandru.croitor@qt.io>2020-05-04 17:38:40 +0200
commit0f7987f0c934b311bd39a5a496ffb0c6128eb8df (patch)
treedea392deb3c43e377a224271c4f450dcff3fc76f /src/plugins/styles/mac/qmacstyle_mac.mm
parentea7d85457d30e915ad470919d2e74867cba9cad8 (diff)
parentf0ea852d4dd6b3139869a952ee92e74cd367866d (diff)
Merge remote-tracking branch 'origin/5.15' into dev
Conflicts: src/corelib/text/qlocale.cpp src/network/access/qnetworkaccessmanager.cpp Regenerated tests/auto/testlib/selftests/float/CMakeLists.txt Change-Id: I5a8ae42511380ca49a38b13c6fa8a3c5df8bed01
Diffstat (limited to 'src/plugins/styles/mac/qmacstyle_mac.mm')
-rw-r--r--src/plugins/styles/mac/qmacstyle_mac.mm10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/plugins/styles/mac/qmacstyle_mac.mm b/src/plugins/styles/mac/qmacstyle_mac.mm
index c08e5b0cf1..871f4b8fb0 100644
--- a/src/plugins/styles/mac/qmacstyle_mac.mm
+++ b/src/plugins/styles/mac/qmacstyle_mac.mm
@@ -3964,13 +3964,19 @@ void QMacStyle::drawControl(ControlElement ce, const QStyleOption *opt, QPainter
// which makes no sense on tabs.
NSPopUpArrowPosition oldPosition = NSPopUpArrowAtCenter;
NSPopUpButtonCell *pbCell = nil;
- if (isPopupButton) {
+ auto rAdjusted = r;
+ if (isPopupButton && tp == QStyleOptionTab::OnlyOneTab) {
pbCell = static_cast<NSPopUpButtonCell *>(pb.cell);
oldPosition = pbCell.arrowPosition;
pbCell.arrowPosition = NSPopUpNoArrow;
+ if (pb.state == NSOffState) {
+ // NSPopUpButton in this state is smaller.
+ rAdjusted.origin.x -= 3;
+ rAdjusted.size.width += 6;
+ }
}
- [pb.cell drawBezelWithFrame:r inView:pb.superview];
+ [pb.cell drawBezelWithFrame:rAdjusted inView:pb.superview];
if (pbCell) // Restore, we may reuse it for a ComboBox.
pbCell.arrowPosition = oldPosition;