diff options
author | Robin Burchell <robin.burchell@collabora.com> | 2011-10-27 10:58:57 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2011-10-28 16:29:13 +0200 |
commit | a2337f79ffd229aa1e91f6bfec6294570eb3fe44 (patch) | |
tree | 48d68ba1c19bb629a096344453cf69cd692affba /src/widgets/styles | |
parent | 1cae2fdb864f2b67333a7c80742b8e493865b3f9 (diff) |
Remove Windows and X11 from src/widgets/platforms.
This is dead code, unused with QPA in place, so remove it to avoid confusion
caused through grepping for class names existing in both old and new places.
Mac code is left in place for now, as some of it is still in use.
Change-Id: Ia82cd5bbabe71285ca997f79d8fd9c0504e32c28
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Diffstat (limited to 'src/widgets/styles')
-rw-r--r-- | src/widgets/styles/qgtkstyle_p.cpp | 3 | ||||
-rw-r--r-- | src/widgets/styles/qmotifstyle.cpp | 10 | ||||
-rw-r--r-- | src/widgets/styles/qstyle.cpp | 15 |
3 files changed, 5 insertions, 23 deletions
diff --git a/src/widgets/styles/qgtkstyle_p.cpp b/src/widgets/styles/qgtkstyle_p.cpp index 35f022bac4..a2fabde736 100644 --- a/src/widgets/styles/qgtkstyle_p.cpp +++ b/src/widgets/styles/qgtkstyle_p.cpp @@ -73,7 +73,6 @@ #include <QtWidgets/QMenuBar> #include <QtWidgets/QToolBar> #include <QtWidgets/QToolButton> -#include <QtWidgets/QX11Info> #include <private/qt_x11_p.h> @@ -947,7 +946,9 @@ void QGtkStylePrivate::setupGtkFileChooser(GtkWidget* gtkFileChooser, QWidget *p XSetTransientForHint(QGtkStylePrivate::gdk_x11_drawable_get_xdisplay(gtkFileChooser->window), QGtkStylePrivate::gdk_x11_drawable_get_xid(gtkFileChooser->window), modalFor->winId()); +#ifdef Q_WS_X11 QGtkStylePrivate::gdk_x11_window_set_user_time (gtkFileChooser->window, QX11Info::appUserTime()); +#endif } diff --git a/src/widgets/styles/qmotifstyle.cpp b/src/widgets/styles/qmotifstyle.cpp index c1c1ffccd5..a18fc3ba97 100644 --- a/src/widgets/styles/qmotifstyle.cpp +++ b/src/widgets/styles/qmotifstyle.cpp @@ -72,10 +72,6 @@ #include <QtWidgets/qgraphicsproxywidget.h> #include <QtWidgets/qgraphicsview.h> -#ifdef Q_WS_X11 -#include "qx11info_x11.h" -#endif - QT_BEGIN_NAMESPACE // old constants that might still be useful... @@ -2693,13 +2689,9 @@ QMotifStyle::styleHint(StyleHint hint, const QStyleOption *opt, const QWidget *w /*! \reimp */ QPalette QMotifStyle::standardPalette() const { -#ifdef Q_WS_X11 QColor background(0xcf, 0xcf, 0xcf); - if (QX11Info::appDepth() <= 8) + if (QPixmap::defaultDepth() <= 8) background = QColor(0xc0, 0xc0, 0xc0); -#else - QColor background = QColor(0xcf, 0xcf, 0xcf); -#endif QColor light = background.lighter(); QColor mid = QColor(0xa6, 0xa6, 0xa6); diff --git a/src/widgets/styles/qstyle.cpp b/src/widgets/styles/qstyle.cpp index 32fe0ce923..44b8f3bc0f 100644 --- a/src/widgets/styles/qstyle.cpp +++ b/src/widgets/styles/qstyle.cpp @@ -52,10 +52,6 @@ #include "qdebug.h" #endif -#ifdef Q_WS_X11 -#include <qx11info_x11.h> -#endif - #include <limits.h> QT_BEGIN_NAMESPACE @@ -2194,15 +2190,8 @@ int QStyle::sliderValueFromPosition(int min, int max, int pos, int span, bool up */ QPalette QStyle::standardPalette() const { -#ifdef Q_WS_X11 - QColor background; - if (QX11Info::appDepth() > 8) - background = QColor(0xd4, 0xd0, 0xc8); // win 2000 grey - else - background = QColor(192, 192, 192); -#else - QColor background(0xd4, 0xd0, 0xc8); // win 2000 grey -#endif + QColor background = QColor(0xd4, 0xd0, 0xc8); // win 2000 grey + QColor light(background.lighter()); QColor dark(background.darker()); QColor mid(Qt::gray); |