diff options
author | Friedemann Kleint <Friedemann.Kleint@nokia.com> | 2012-07-12 09:54:50 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-07-18 08:18:46 +0200 |
commit | fc3207dfe1b615a856b6ad8eef22a8774e4a17f4 (patch) | |
tree | b4ad3d890ad8064cbdd2bceaf69274bcdcf360ad /src/gui/kernel/qplatformintegration.cpp | |
parent | 26318a8cb2115e0fddb119b203217a52dc8e98a2 (diff) |
Mirror potentially themeable style hints in QPlatformTheme.
Currently, most of the QStyleHint-values are potentially
configureable by the user in certain desktop environments.
Add them to the QPlatformTheme and query the theme first.
Keep the values in QPlatformIntegration such that simple
integrations that do not implement themes are not forced
to implement them to change the values.
Change-Id: I15742a5968df0ad5d7398cceae640dc7e541da52
Reviewed-by: David Faure <faure@kde.org>
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
Diffstat (limited to 'src/gui/kernel/qplatformintegration.cpp')
-rw-r--r-- | src/gui/kernel/qplatformintegration.cpp | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/src/gui/kernel/qplatformintegration.cpp b/src/gui/kernel/qplatformintegration.cpp index d9e9c75920..b713b713ae 100644 --- a/src/gui/kernel/qplatformintegration.cpp +++ b/src/gui/kernel/qplatformintegration.cpp @@ -48,6 +48,7 @@ #include <QtGui/private/qguiapplication_p.h> #include <QtGui/private/qpixmap_raster_p.h> #include <qpa/qplatformscreen_p.h> +#include <qpa/qplatformtheme.h> #include <private/qdnd_p.h> QT_BEGIN_NAMESPACE @@ -279,25 +280,25 @@ QVariant QPlatformIntegration::styleHint(StyleHint hint) const { switch (hint) { case CursorFlashTime: - return 1000; + return QPlatformTheme::defaultThemeHint(QPlatformTheme::CursorFlashTime); case KeyboardInputInterval: - return 400; + return QPlatformTheme::defaultThemeHint(QPlatformTheme::KeyboardInputInterval); case KeyboardAutoRepeatRate: - return 30; + return QPlatformTheme::defaultThemeHint(QPlatformTheme::KeyboardAutoRepeatRate); case MouseDoubleClickInterval: - return 400; + return QPlatformTheme::defaultThemeHint(QPlatformTheme::MouseDoubleClickInterval); case StartDragDistance: - return 10; + return QPlatformTheme::defaultThemeHint(QPlatformTheme::StartDragDistance); case StartDragTime: - return 500; + return QPlatformTheme::defaultThemeHint(QPlatformTheme::StartDragTime); case ShowIsFullScreen: return false; case PasswordMaskDelay: - return 0; + return QPlatformTheme::defaultThemeHint(QPlatformTheme::PasswordMaskDelay); case FontSmoothingGamma: return qreal(1.7); case StartDragVelocity: - return 0; // no limit + return QPlatformTheme::defaultThemeHint(QPlatformTheme::StartDragVelocity); case UseRtlExtensions: return QVariant(false); } |