diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/styles/qgtkstyle.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/gui/styles/qgtkstyle.cpp b/src/gui/styles/qgtkstyle.cpp index ca71da2..86653df 100644 --- a/src/gui/styles/qgtkstyle.cpp +++ b/src/gui/styles/qgtkstyle.cpp @@ -140,10 +140,7 @@ static const char * const dock_widget_restore_xpm[] = class QGtkStyleFilter : public QObject { public: - QGtkStyleFilter() { - qApp->installEventFilter(this); - } - + QGtkStyleFilter() {} private: bool eventFilter(QObject *obj, QEvent *e); }; @@ -167,7 +164,12 @@ class QGtkStylePrivate : public QCleanlooksStylePrivate public: QGtkStylePrivate() : QCleanlooksStylePrivate() - {} + { + QGtk::initGtkWidgets(); + if (QGtk::isThemeAvailable()) + qApp->installEventFilter(&filter); + + } QGtkStyleFilter filter; }; @@ -243,7 +245,6 @@ static QString uniqueName(const QString &key, const QStyleOption *option, const QGtkStyle::QGtkStyle() : QCleanlooksStyle(*new QGtkStylePrivate) { - QGtk::initGtkWidgets(); } /*! |