From c308a796d931f9c6e4b0d559e96c233f40223d31 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Mon, 17 Feb 2020 12:40:30 +0100 Subject: [PATCH] Windows QPA: Fix disabled color of menu items in dark mode Replace green by the standard light color. Fixes: QTBUG-82197 Change-Id: I12477a055788cc7b6c829e315d5ae9f1577770bf Reviewed-by: Oliver Wolff --- src/plugins/platforms/windows/qwindowstheme.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/plugins/platforms/windows/qwindowstheme.cpp b/src/plugins/platforms/windows/qwindowstheme.cpp index 325956b7ba..7f47cd712f 100644 --- a/src/plugins/platforms/windows/qwindowstheme.cpp +++ b/src/plugins/platforms/windows/qwindowstheme.cpp @@ -248,8 +248,7 @@ enum DarkModeColors : QRgb { darkModeBtnHighlightRgb = 0xc0c0c0, darkModeBtnShadowRgb = 0x808080, darkModeHighlightRgb = 0x0055ff, // deviating from 0x800080 - darkModeMenuHighlightRgb = darkModeHighlightRgb, - darkModeGrayTextRgb = 0x00ff00 + darkModeMenuHighlightRgb = darkModeHighlightRgb }; // from QStyle::standardPalette @@ -386,7 +385,7 @@ static inline QPalette menuPalette(const QPalette &systemPalette, bool light) const QColor menuColor = light ? getSysColor(COLOR_MENU) : QColor(Qt::black); const QColor menuTextColor = light ? getSysColor(COLOR_MENUTEXT) : QColor(Qt::white); const QColor disabled = light - ? getSysColor(COLOR_GRAYTEXT) : QColor(darkModeGrayTextRgb); + ? getSysColor(COLOR_GRAYTEXT) : QColor(darkModeBtnHighlightRgb); // we might need a special color group for the result. result.setColor(QPalette::Active, QPalette::Button, menuColor); result.setColor(QPalette::Active, QPalette::Text, menuTextColor);