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/styles/mac/qmacstyle_mac.mm') 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 From 41702d8455a9e88ac70108e500a10e7bd4df2771 Mon Sep 17 00:00:00 2001 From: Christian Ehrlicher Date: Mon, 21 Oct 2019 21:23:08 +0200 Subject: Honor alpha for SH_Table_GridLineColor Make sure to honor the alpha channel for the color returned by SH_Table_GridLineColor. Fixes: QTBUG-74909 Change-Id: If9688329e5e2ab41833dfeb7e6292fdfcbf63aa1 Reviewed-by: Richard Moe Gustavsen --- src/plugins/styles/mac/qmacstyle_mac.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/plugins/styles/mac/qmacstyle_mac.mm') diff --git a/src/plugins/styles/mac/qmacstyle_mac.mm b/src/plugins/styles/mac/qmacstyle_mac.mm index 610329a350..603c6e93f3 100644 --- a/src/plugins/styles/mac/qmacstyle_mac.mm +++ b/src/plugins/styles/mac/qmacstyle_mac.mm @@ -2873,7 +2873,7 @@ int QMacStyle::styleHint(StyleHint sh, const QStyleOption *opt, const QWidget *w ret = false; break; case SH_Table_GridLineColor: - ret = int(qt_mac_toQColor(NSColor.gridColor).rgb()); + ret = int(qt_mac_toQColor(NSColor.gridColor).rgba()); break; default: ret = QCommonStyle::styleHint(sh, opt, w, hret); -- cgit v1.2.3