diff options
author | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2024-04-10 14:58:14 +0200 |
---|---|---|
committer | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2024-04-11 04:35:17 +0200 |
commit | 19b38ede7804e23a1abe7ddabb447c7f5a907a7c (patch) | |
tree | 266346c127959c2a55219886d161d5acf9e03511 /src/plugins | |
parent | 97d227acc74c6034615dc05d9d94ee5cad7c5f50 (diff) |
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>
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/styles/mac/qmacstyle_mac.mm | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/src/plugins/styles/mac/qmacstyle_mac.mm b/src/plugins/styles/mac/qmacstyle_mac.mm index 7a255f7af1..94cb07c914 100644 --- a/src/plugins/styles/mac/qmacstyle_mac.mm +++ b/src/plugins/styles/mac/qmacstyle_mac.mm @@ -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 |