summaryrefslogtreecommitdiffstats
path: root/src/gui/styles
diff options
context:
space:
mode:
authorJens Bache-Wiig <jbache@trolltech.com>2009-04-06 12:17:15 (GMT)
committerJens Bache-Wiig <jbache@trolltech.com>2009-04-06 12:19:48 (GMT)
commitf06c4f2d7378b40a0a184393a8986032d5a700ee (patch)
tree1ec9acc80ac8082b2de8891c1bf264da6af75417 /src/gui/styles
parentcc18633fe45d599bfeac2a8b2737d155f1dd5564 (diff)
downloadQt-f06c4f2d7378b40a0a184393a8986032d5a700ee.zip
Qt-f06c4f2d7378b40a0a184393a8986032d5a700ee.tar.gz
Qt-f06c4f2d7378b40a0a184393a8986032d5a700ee.tar.bz2
BT: Fix combobox background color regression
There was a regression in the background color for QComboBox popups. This should resolve it. It essentially tells the system to stay off the system palette while QGtkStyle is used. We will introduce a cleaner style hint for this in 4.6. Reviewed-by: nrc
Diffstat (limited to 'src/gui/styles')
-rw-r--r--src/gui/styles/gtksymbols.cpp8
1 files changed, 1 insertions, 7 deletions
diff --git a/src/gui/styles/gtksymbols.cpp b/src/gui/styles/gtksymbols.cpp
index 8123d32..f7af8f8 100644
--- a/src/gui/styles/gtksymbols.cpp
+++ b/src/gui/styles/gtksymbols.cpp
@@ -504,13 +504,6 @@ static QPalette gtkWidgetPalette(const QString &gtkWidgetName)
pal.setBrush(QPalette::Disabled, QPalette::WindowText, disabledTextColor);
pal.setBrush(QPalette::All, QPalette::ButtonText, textColor);
pal.setBrush(QPalette::Disabled, QPalette::ButtonText, disabledTextColor);
- if (gtkWidgetName == QLS("GtkMenu")) {
- // This really applies to the combo box rendering since
- // QComboBox copies the palette from a QMenu
- GdkColor gdkBg = gtkWidget->style->bg[GTK_STATE_NORMAL];
- QColor bgColor(gdkBg.red>>8, gdkBg.green>>8, gdkBg.blue>>8);
- pal.setBrush(QPalette::Base, bgColor);
- }
return pal;
}
@@ -528,6 +521,7 @@ void QGtk::applyCustomPaletteHash()
GdkColor gdkBg = QGtk::gtkWidget(QLS("GtkMenu"))->style->bg[GTK_STATE_NORMAL];
QColor bgColor(gdkBg.red>>8, gdkBg.green>>8, gdkBg.blue>>8);
menuPal.setBrush(QPalette::Base, bgColor);
+ menuPal.setBrush(QPalette::Window, bgColor);
qApp->setPalette(menuPal, "QMenu");
QPalette toolbarPal = gtkWidgetPalette(QLS("GtkToolbar"));