From b145c1db00ee04355221f11124efffee94ee7120 Mon Sep 17 00:00:00 2001 From: Gabriel de Dietrich Date: Thu, 20 Mar 2014 13:59:45 +0100 Subject: [PATCH] Mac theming: Set background brush for menu palette We also remove overriding the background when polishing the palette in QMacStyle. This is a leftover from pre-10.5 styling. Change-Id: Icaa6d9c864ab01783d83cc02192981136c417d24 Reviewed-by: Jens Bache-Wiig --- src/plugins/platforms/cocoa/qcocoasystemsettings.mm | 2 ++ src/widgets/styles/qmacstyle_mac.mm | 5 ----- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/src/plugins/platforms/cocoa/qcocoasystemsettings.mm b/src/plugins/platforms/cocoa/qcocoasystemsettings.mm index 1c08d4bcb7..1b3b12f337 100644 --- a/src/plugins/platforms/cocoa/qcocoasystemsettings.mm +++ b/src/plugins/platforms/cocoa/qcocoasystemsettings.mm @@ -191,6 +191,8 @@ QHash qt_mac_createRolePalettes() pal.setColor(QPalette::Disabled, QPalette::HighlightedText, qc); } if (mac_widget_colors[i].paletteRole == QPlatformTheme::MenuPalette) { + qc = qt_mac_colorForTheme(kThemeBrushMenuBackground); + pal.setBrush(QPalette::Background, qc); qc = qt_mac_colorForThemeTextColor(kThemeTextColorMenuItemActive); pal.setBrush(QPalette::ButtonText, qc); qc = qt_mac_colorForThemeTextColor(kThemeTextColorMenuItemSelected); diff --git a/src/widgets/styles/qmacstyle_mac.mm b/src/widgets/styles/qmacstyle_mac.mm index c4e77425bd..b8e02cc6c1 100644 --- a/src/widgets/styles/qmacstyle_mac.mm +++ b/src/widgets/styles/qmacstyle_mac.mm @@ -1917,11 +1917,6 @@ void QMacStyle::polish(QPalette &pal) qt_mac_backgroundPattern = new QPixmap(d->generateBackgroundPattern()); } - QColor pc(Qt::black); - pc = qcolorForTheme(kThemeBrushDialogBackgroundActive); - QBrush background(pc, *qt_mac_backgroundPattern); - pal.setBrush(QPalette::All, QPalette::Window, background); - pal.setBrush(QPalette::All, QPalette::Button, background); QCFString theme; const OSErr err = CopyThemeIdentifier(&theme);