From b73513eb1f499dec8f9b18cb6827aa25fd1b5a91 Mon Sep 17 00:00:00 2001 From: Uwe Rathmann Date: Mon, 9 Oct 2023 10:32:03 +0200 Subject: [PATCH] using styleHints for the minimal pan distance --- src/controls/QskPanGestureRecognizer.cpp | 5 +++-- src/controls/QskSkinManager.cpp | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/controls/QskPanGestureRecognizer.cpp b/src/controls/QskPanGestureRecognizer.cpp index f7db9f5a..c103730d 100644 --- a/src/controls/QskPanGestureRecognizer.cpp +++ b/src/controls/QskPanGestureRecognizer.cpp @@ -7,10 +7,11 @@ #include "QskEvent.h" #include "QskGesture.h" -#include #include #include #include +#include +#include static inline bool qskIsInOrientation( const QPointF& from, const QPointF& to, Qt::Orientations orientations ) @@ -146,7 +147,7 @@ class QskPanGestureRecognizer::PrivateData public: Qt::Orientations orientations = Qt::Horizontal | Qt::Vertical; - int minDistance = 15; + int minDistance = QGuiApplication::styleHints()->startDragDistance() + 5; quint64 timestampVelocity = 0.0; // timestamp of the last mouse event qreal angle = 0.0; diff --git a/src/controls/QskSkinManager.cpp b/src/controls/QskSkinManager.cpp index 218d2747..33864821 100644 --- a/src/controls/QskSkinManager.cpp +++ b/src/controls/QskSkinManager.cpp @@ -121,7 +121,7 @@ namespace scheme = Qt::ColorScheme::Unknown; } - const auto systemScheme = qGuiApp->styleHints()->colorScheme(); + const auto systemScheme = QGuiApplication::styleHints()->colorScheme(); if( scheme == systemScheme ) {