summaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
authorVolker Hilsheimer <volker.hilsheimer@qt.io>2019-11-05 10:15:59 +0100
committerVolker Hilsheimer <volker.hilsheimer@qt.io>2019-11-06 01:21:47 +0100
commitbc4c2382aacbb33fad4a2d06fc631e4859f12a33 (patch)
tree282b3c862ab19908d156753c90392631f6391032 /src/plugins
parent2e63d121839dae2794685001563783eea4c997f0 (diff)
QMdiArea: On macOS, render inactive subwindow controls grayed out
The controls were correctly grayed out when the entire window was not active, but inactive subwindows showed their controls in color, and only the titlebar had a slightly paler gradient to indicate that they are not active. MDI is not a concept on macOS and there is no clear style guide for how such windows are supposed to behave, but the look of the inactive titlebar before this change is too similar to the active state for it to be useful. This change restores the pre-5.11 state, prior to the removal of HITheme based styling in 8633e1a7b48f71e91f81ef5c667d6eb7a8db3adb. Change-Id: If009bf085a87fe2610d888636348dc8b13a93ec1 Fixes: QTBUG-79648 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/styles/mac/qmacstyle_mac.mm2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/styles/mac/qmacstyle_mac.mm b/src/plugins/styles/mac/qmacstyle_mac.mm
index 63dc49fd18..610329a350 100644
--- a/src/plugins/styles/mac/qmacstyle_mac.mm
+++ b/src/plugins/styles/mac/qmacstyle_mac.mm
@@ -5539,7 +5539,7 @@ void QMacStyle::drawComplexControl(ComplexControl cc, const QStyleOptionComplex
const auto ct = d->windowButtonCocoaControl(sc);
const auto cw = QMacStylePrivate::CocoaControl(ct, QStyleHelper::SizeLarge);
auto *wb = static_cast<NSButton *>(d->cocoaControl(cw));
- wb.enabled = (sc & titlebar->subControls);
+ wb.enabled = (sc & titlebar->subControls) && isActive;
[wb highlight:(titlebar->state & State_Sunken) && (sc & titlebar->activeSubControls)];
Q_UNUSED(isHovered); // FIXME No public API for this