summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGabriel de Dietrich <gabriel.dedietrich@digia.com>2014-03-20 13:59:45 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-03-21 18:02:10 +0100
commitb145c1db00ee04355221f11124efffee94ee7120 (patch)
tree09f1ce7f7107c0c56abfe9dd78a2892b79cdab7f
parent9379dd94103e4efd5be8867892f0a562c224d26d (diff)
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 <jens.bache-wiig@digia.com>
-rw-r--r--src/plugins/platforms/cocoa/qcocoasystemsettings.mm2
-rw-r--r--src/widgets/styles/qmacstyle_mac.mm5
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<QPlatformTheme::Palette, QPalette*> 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);