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 <volker.hilsheimer@qt.io>
bb10
Santhosh Kumar 2023-09-08 16:34:59 +02:00
parent cadae8b6e6
commit 25c9f59546
1 changed files with 2 additions and 3 deletions

View File

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