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 8633e1a7b4.

Change-Id: If009bf085a87fe2610d888636348dc8b13a93ec1
Fixes: QTBUG-79648
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
bb10
Volker Hilsheimer 2019-11-05 10:15:59 +01:00
parent 2e63d12183
commit bc4c2382aa
1 changed files with 1 additions and 1 deletions

View File

@ -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