From bf469e923ef97ed260ddfb9b529fd503a841485e Mon Sep 17 00:00:00 2001 From: "Bradley T. Hughes" Date: Tue, 20 Mar 2012 10:53:45 +0100 Subject: [PATCH] Cocoa: fix inactive palette text color MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The QPalette::Inactive text color should be the same as kThemeTextColorDialogActive. kThemeTextColorDialogInactive is for disabled widgets/windows. Change-Id: I55eb63fff213cb9870a991455cbc3254b9d1538e Reviewed-by: Morten Johan Sørvig --- .../platforms/cocoa/qcocoasystemsettings.mm | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/src/plugins/platforms/cocoa/qcocoasystemsettings.mm b/src/plugins/platforms/cocoa/qcocoasystemsettings.mm index c2f5df4d38..d02154b006 100644 --- a/src/plugins/platforms/cocoa/qcocoasystemsettings.mm +++ b/src/plugins/platforms/cocoa/qcocoasystemsettings.mm @@ -122,24 +122,25 @@ QPalette * qt_mac_createSystemPalette() palette->setColor(QPalette::Inactive, QPalette::Dark, QColor(191, 191, 191)); // System palette initialization: - palette->setBrush( QPalette::Active, QPalette::Highlight, qt_mac_colorForTheme(kThemeBrushPrimaryHighlightColor) ); - palette->setBrush( QPalette::Inactive, QPalette::Highlight, qt_mac_colorForTheme(kThemeBrushSecondaryHighlightColor) ); + palette->setBrush(QPalette::Active, QPalette::Highlight, qt_mac_colorForTheme(kThemeBrushPrimaryHighlightColor)); + qc = qt_mac_colorForTheme(kThemeBrushSecondaryHighlightColor); + palette->setBrush(QPalette::Inactive, QPalette::Highlight, qc); + palette->setBrush(QPalette::Disabled, QPalette::Highlight, qc); - palette->setBrush( QPalette::Disabled, QPalette::Highlight, qt_mac_colorForTheme(kThemeBrushSecondaryHighlightColor) ); - palette->setBrush( QPalette::Active, QPalette::Shadow, qt_mac_colorForTheme(kThemeBrushButtonActiveDarkShadow) ); - - palette->setBrush( QPalette::Inactive, QPalette::Shadow, qt_mac_colorForTheme(kThemeBrushButtonInactiveDarkShadow) ); - palette->setBrush( QPalette::Disabled, QPalette::Shadow, qt_mac_colorForTheme(kThemeBrushButtonInactiveDarkShadow) ); + palette->setBrush(QPalette::Active, QPalette::Shadow, qt_mac_colorForTheme(kThemeBrushButtonActiveDarkShadow)); + qc = qt_mac_colorForTheme(kThemeBrushButtonInactiveDarkShadow); + palette->setBrush(QPalette::Inactive, QPalette::Shadow, qc); + palette->setBrush(QPalette::Disabled, QPalette::Shadow, qc); qc = qt_mac_colorForThemeTextColor(kThemeTextColorDialogActive); palette->setColor(QPalette::Active, QPalette::Text, qc); palette->setColor(QPalette::Active, QPalette::WindowText, qc); palette->setColor(QPalette::Active, QPalette::HighlightedText, qc); - - qc = qt_mac_colorForThemeTextColor(kThemeTextColorDialogInactive); palette->setColor(QPalette::Inactive, QPalette::Text, qc); palette->setColor(QPalette::Inactive, QPalette::WindowText, qc); palette->setColor(QPalette::Inactive, QPalette::HighlightedText, qc); + + qc = qt_mac_colorForThemeTextColor(kThemeTextColorDialogInactive); palette->setColor(QPalette::Disabled, QPalette::Text, qc); palette->setColor(QPalette::Disabled, QPalette::WindowText, qc); palette->setColor(QPalette::Disabled, QPalette::HighlightedText, qc);