diff options
author | Jens Bache-Wiig <jbache@trolltech.com> | 2009-04-02 11:19:42 (GMT) |
---|---|---|
committer | Jens Bache-Wiig <jbache@trolltech.com> | 2009-04-02 11:23:17 (GMT) |
commit | ca582d6cb205461cfcdf448749b46ee654faa5fd (patch) | |
tree | 1228bd1cc9f68f3ea578818bf8a60c8351938f46 /src/gui/styles/gtksymbols.cpp | |
parent | e008504b5ec34975e34adf3b1a2b7170d0e4dd38 (diff) | |
download | Qt-ca582d6cb205461cfcdf448749b46ee654faa5fd.zip Qt-ca582d6cb205461cfcdf448749b46ee654faa5fd.tar.gz Qt-ca582d6cb205461cfcdf448749b46ee654faa5fd.tar.bz2 |
Improved stylesheet support for setting background and foreground roles
This makes sure that style sheets set both ButtonText and WindowText roles
for all widgets. This fixes among other things the fact that you could not
configure text colors for combo box popups on Mac, Gtk and CleanLooks or
set the background for the whole scrollbar.
Task-number: 160713
Reviewed-by: ogoffart
Diffstat (limited to 'src/gui/styles/gtksymbols.cpp')
-rw-r--r-- | src/gui/styles/gtksymbols.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gui/styles/gtksymbols.cpp b/src/gui/styles/gtksymbols.cpp index 3fbf233..f60c980 100644 --- a/src/gui/styles/gtksymbols.cpp +++ b/src/gui/styles/gtksymbols.cpp @@ -529,14 +529,14 @@ void QGtk::applyGtkSystemPalette(QWidget *widget) ensureWidgetPalette(menubar, QLS("GtkMenuBar")); else if (QToolBar *toolbar = qobject_cast<QToolBar*> (widget)) ensureWidgetPalette(toolbar, QLS("GtkToolbar")); - else if (QMenu *menubar = qobject_cast<QMenu*> (widget)) { + else if (QMenu *menu = qobject_cast<QMenu*> (widget)) { // This really applies to the combo box rendering since // QComboBox copies the palette from a QMenu QPalette pal = widget->palette(); GdkColor gdkBg = QGtk::gtkWidget(QLS("GtkMenu"))->style->bg[GTK_STATE_NORMAL]; QColor bgColor(gdkBg.red>>8, gdkBg.green>>8, gdkBg.blue>>8); pal.setBrush(QPalette::Base, bgColor); - menubar->setPalette(pal); + menu->setPalette(pal); } widget->setAttribute(Qt::WA_SetPalette, false); } |