From bc4c2382aacbb33fad4a2d06fc631e4859f12a33 Mon Sep 17 00:00:00 2001 From: Volker Hilsheimer Date: Tue, 5 Nov 2019 10:15:59 +0100 Subject: QMdiArea: On macOS, render inactive subwindow controls grayed out MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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ø --- src/plugins/styles/mac/qmacstyle_mac.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/plugins') 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(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 -- cgit v1.2.3