From 25c9f595465b5333f558b35a165e6940d834037d Mon Sep 17 00:00:00 2001 From: Santhosh Kumar Date: Fri, 8 Sep 2023 16:34:59 +0200 Subject: [PATCH] Show command link button in respective color for windowsvista style The command link button was shown in active color even when its disabled while using windows vista style and the patch e9cf618a9d0ead8711a5fbe563b1c7118c0143c8 further cause regression when hovered over it. This patch fixes it by setting color for corresponding color group in windows vista style. Pick-to: 6.6 6.5 Change-Id: I9a8f62f8c5895592571978ec7c9abccfc69e64a2 Reviewed-by: Volker Hilsheimer --- src/plugins/styles/windowsvista/qwindowsvistastyle.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/plugins/styles/windowsvista/qwindowsvistastyle.cpp b/src/plugins/styles/windowsvista/qwindowsvistastyle.cpp index 948bf063b8..a800e6ba22 100644 --- a/src/plugins/styles/windowsvista/qwindowsvistastyle.cpp +++ b/src/plugins/styles/windowsvista/qwindowsvistastyle.cpp @@ -4661,9 +4661,8 @@ void QWindowsVistaStyle::polish(QWidget *widget) buttonFont.setFamilies(QStringList{QLatin1String("Segoe UI")}); widget->setFont(buttonFont); QPalette pal = widget->palette(); - pal.setColor(QPalette::ButtonText, QColor(21, 28, 85)); - pal.setColor(QPalette::BrightText, QColor(7, 64, 229)); - pal.setResolveMask(0); + pal.setColor(QPalette::Active, QPalette::ButtonText, QColor(21, 28, 85)); + pal.setColor(QPalette::Active, QPalette::BrightText, QColor(7, 64, 229)); widget->setPalette(pal); } #endif // QT_CONFIG(commandlinkbutton)