From a134b57152964e1279f62606cce0a7e7f521c32a Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Tue, 3 Dec 2013 12:45:29 +0100 Subject: Windows: Show context menu on mouse release. Introduce a hint to QPlatformTheme to control the behavior. Task-number: QTBUG-35231 Change-Id: Ia28e153a8dd3f1931321a222d8906ca87166ed62 Reviewed-by: Shawn Rutledge Reviewed-by: Joerg Bornemann --- src/gui/kernel/qplatformtheme.cpp | 3 +++ src/gui/kernel/qplatformtheme.h | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) (limited to 'src/gui') diff --git a/src/gui/kernel/qplatformtheme.cpp b/src/gui/kernel/qplatformtheme.cpp index 1844232efe..3548ec0199 100644 --- a/src/gui/kernel/qplatformtheme.cpp +++ b/src/gui/kernel/qplatformtheme.cpp @@ -142,6 +142,8 @@ QT_BEGIN_NAMESPACE \value DialogSnapToDefaultButton (bool) Whether the mouse should snap to the default button when a dialog becomes visible. + \value ContextMenuOnMouseRelease (bool) Whether the context menu should be shown on mouse release. + \sa themeHint(), QStyle::pixelMetric() */ @@ -487,6 +489,7 @@ QVariant QPlatformTheme::defaultThemeHint(ThemeHint hint) case IconPixmapSizes: return QVariant::fromValue(QList()); case DialogSnapToDefaultButton: + case ContextMenuOnMouseRelease: return QVariant(false); } return QVariant(); diff --git a/src/gui/kernel/qplatformtheme.h b/src/gui/kernel/qplatformtheme.h index 4bddac5b1b..5cdec48ca3 100644 --- a/src/gui/kernel/qplatformtheme.h +++ b/src/gui/kernel/qplatformtheme.h @@ -106,7 +106,8 @@ public: TabAllWidgets, IconPixmapSizes, PasswordMaskCharacter, - DialogSnapToDefaultButton + DialogSnapToDefaultButton, + ContextMenuOnMouseRelease }; enum DialogType { -- cgit v1.2.3