summaryrefslogtreecommitdiffstats
path: root/src/gui/styles/gtksymbols.cpp
diff options
context:
space:
mode:
authorJens Bache-Wiig <jbache@trolltech.com>2009-08-10 16:19:53 (GMT)
committerJens Bache-Wiig <jbache@trolltech.com>2009-08-10 16:19:53 (GMT)
commitf9605d3f396043e5b893470acaeb4c726361e9dc (patch)
treed7215d77270daed0bad8f0d0e1169ca6e5f62079 /src/gui/styles/gtksymbols.cpp
parent13a31fe82845f8b1f4d86919080d3b2a87c4d061 (diff)
downloadQt-f9605d3f396043e5b893470acaeb4c726361e9dc.zip
Qt-f9605d3f396043e5b893470acaeb4c726361e9dc.tar.gz
Qt-f9605d3f396043e5b893470acaeb4c726361e9dc.tar.bz2
Make QGtkStyle react properly to font changes in GNOME
We only reacted to font changes before when the whole theme changed. Two things had to be fixed to support this. We need to check if the font changed in QGtkStyle::updateTheme and we need to make sure that QApplication does not reset these settings for us. Reviewed-by: joao
Diffstat (limited to 'src/gui/styles/gtksymbols.cpp')
-rw-r--r--src/gui/styles/gtksymbols.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/gui/styles/gtksymbols.cpp b/src/gui/styles/gtksymbols.cpp
index c8b4fda..2d8d6e2 100644
--- a/src/gui/styles/gtksymbols.cpp
+++ b/src/gui/styles/gtksymbols.cpp
@@ -547,9 +547,13 @@ void QGtkStyleUpdateScheduler::updateTheme()
{
static QString oldTheme(QLS("qt_not_set"));
QPixmapCache::clear();
+
+ QFont font = QGtk::getThemeFont();
+ if (QApplication::font() != font)
+ qApp->setFont(font);
+
if (oldTheme != getThemeName()) {
oldTheme = getThemeName();
- qApp->setFont(QGtk::getThemeFont());
QPalette newPalette = qApp->style()->standardPalette();
QApplicationPrivate::setSystemPalette(newPalette);
QApplication::setPalette(newPalette);