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 Change-Id: Iac26fdb1518ffe4f8255e01bedf7329be40ac258 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> (cherry picked from commit 19b38ede7804e23a1abe7ddabb447c7f5a907a7c) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
3a0ed76c57
commit
6c67572181
@ -5572,16 +5572,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