QFusionStyle: fix highlight colors

Respect the current color group of the palette,
and fix the inactive highlight color.

Task-number: QTBUG-30034
Change-Id: Iddfc15a2dd98d4588c6c587b7aaf64d88538fa28
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
This commit is contained in:
J-P Nurmi 2013-05-22 18:54:10 +02:00 committed by The Qt Project
parent 23fd348631
commit 7a6c0f0673
2 changed files with 3 additions and 3 deletions

View File

@ -1127,7 +1127,7 @@ Q_GUI_EXPORT QPalette qt_fusionPalette()
fusionPalette.setBrush(QPalette::Disabled, QPalette::Shadow, disabledShadow);
fusionPalette.setBrush(QPalette::Active, QPalette::Highlight, QColor(48, 140, 198));
fusionPalette.setBrush(QPalette::Inactive, QPalette::Highlight, QColor(145, 141, 126));
fusionPalette.setBrush(QPalette::Inactive, QPalette::Highlight, QColor(48, 140, 198));
fusionPalette.setBrush(QPalette::Disabled, QPalette::Highlight, QColor(145, 141, 126));
return fusionPalette;
}

View File

@ -102,13 +102,13 @@ public:
QColor highlight(const QPalette &pal) const {
if (isMacSystemPalette(pal))
return QColor(60, 140, 230);
return pal.color(QPalette::Active, QPalette::Highlight);
return pal.color(QPalette::Highlight);
}
QColor highlightedText(const QPalette &pal) const {
if (isMacSystemPalette(pal))
return Qt::white;
return pal.color(QPalette::Active, QPalette::HighlightedText);
return pal.color(QPalette::HighlightedText);
}
QColor outline(const QPalette &pal) const {