QMacStyle - fix tab buttons
not to have arrows under some conditions. NSPopUpButton had a needed color, except it also has arrow(s). Which looks quite confusing on an inactive window on a tab button. Fixes: QTBUG-82122 Change-Id: I40c57abe9ccae48fa906d592169c412f5f89f712 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>bb10
parent
8e74bf4d4a
commit
0e643bf783
|
|
@ -3972,7 +3972,20 @@ void QMacStyle::drawControl(ControlElement ce, const QStyleOption *opt, QPainter
|
|||
CGContextRotateCTM(ctx, M_PI_2);
|
||||
}
|
||||
|
||||
// Now, if it's a trick with a popup button, it has an arrow
|
||||
// which makes no sense on tabs.
|
||||
NSPopUpArrowPosition oldPosition = NSPopUpArrowAtCenter;
|
||||
NSPopUpButtonCell *pbCell = nil;
|
||||
if (isPopupButton) {
|
||||
pbCell = static_cast<NSPopUpButtonCell *>(pb.cell);
|
||||
oldPosition = pbCell.arrowPosition;
|
||||
pbCell.arrowPosition = NSPopUpNoArrow;
|
||||
}
|
||||
|
||||
[pb.cell drawBezelWithFrame:r inView:pb.superview];
|
||||
|
||||
if (pbCell) // Restore, we may reuse it for a ComboBox.
|
||||
pbCell.arrowPosition = oldPosition;
|
||||
};
|
||||
|
||||
if (needsInactiveHack) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue