summaryrefslogtreecommitdiff
path: root/src/gui/styles
diff options
context:
space:
mode:
authorJens Bache-Wiig <jbache@trolltech.com>2009-08-10 18:19:53 +0200
committerJens Bache-Wiig <jbache@trolltech.com>2009-08-10 18:19:53 +0200
commitf9605d3f396043e5b893470acaeb4c726361e9dc (patch)
treed7215d77270daed0bad8f0d0e1169ca6e5f62079 /src/gui/styles
parent13a31fe82845f8b1f4d86919080d3b2a87c4d061 (diff)
downloadqt4-tools-f9605d3f396043e5b893470acaeb4c726361e9dc.tar.gz
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')
-rw-r--r--src/gui/styles/gtksymbols.cpp6
-rw-r--r--src/gui/styles/qgtkstyle.cpp2
2 files changed, 6 insertions, 2 deletions
diff --git a/src/gui/styles/gtksymbols.cpp b/src/gui/styles/gtksymbols.cpp
index c8b4fda475..2d8d6e282b 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);
diff --git a/src/gui/styles/qgtkstyle.cpp b/src/gui/styles/qgtkstyle.cpp
index f6d8c889dc..5f562305f9 100644
--- a/src/gui/styles/qgtkstyle.cpp
+++ b/src/gui/styles/qgtkstyle.cpp
@@ -1,4 +1,4 @@
-/******* *********************************************************************
+/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
** Contact: Nokia Corporation (qt-info@nokia.com)