Mac style: draw MDI window title bar without gradient
Use a solid fill with the "button" color of the palette also for active title bars, which is then the same color as the frame, and gives the window a consistent look in both dark and light mode. Fixes: QTBUG-123162 Pick-to: 6.7 Change-Id: Iac26fdb1518ffe4f8255e01bedf7329be40ac258 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
This commit is contained in:
parent
97d227acc7
commit
19b38ede78
@ -5626,16 +5626,7 @@ void QMacStyle::drawComplexControl(ComplexControl cc, const QStyleOptionComplex
|
||||
const auto frameAdjust = 1.0 / p->device()->devicePixelRatio();
|
||||
const auto innerFrameRect = outerFrameRect.adjusted(frameAdjust, frameAdjust, -frameAdjust, 0);
|
||||
QPainterPath innerFramePath = d->windowPanelPath(innerFrameRect);
|
||||
if (isActive) {
|
||||
QLinearGradient g;
|
||||
g.setStart(QPointF(0, 0));
|
||||
g.setFinalStop(QPointF(0, 2 * opt->rect.height()));
|
||||
g.setColorAt(0, opt->palette.button().color());
|
||||
g.setColorAt(1, opt->palette.dark().color());
|
||||
p->fillPath(innerFramePath, g);
|
||||
} else {
|
||||
p->fillPath(innerFramePath, opt->palette.button());
|
||||
}
|
||||
p->fillPath(innerFramePath, opt->palette.button());
|
||||
|
||||
if (titlebar->subControls & (SC_TitleBarCloseButton
|
||||
| SC_TitleBarMaxButton
|
||||
|
Loading…
x
Reference in New Issue
Block a user