This repository has been archived by the owner on Jun 8, 2021. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
platformtheme: Implement DoubleClick/DoubleTap distances
In Qt 5.12.4[1], Qt started checking for the distance between two clicks or taps when deciding whether a Clicked event should become a DoubleClicked event. The default distance in Qt 5.12.9 is 5 pixels horizontally or vertically from the initial click point. The double tap distance is defined as twice the double click distance[2]. We can use the DPI value of the screen to determine a likely value of .15 (3/20) of an inch for distance between click events, and .30 of an inch for touch events. These values, and most of the implementation, were taken from the Android QPA[3]. Fixes ubports/keyboard-component#159 Fixes ubports/keyboard-component#158 [1] qt/qtdeclarative@56fbc27 [2] https://github.com/qt/qtbase/blob/5.12.9/src/gui/kernel/qplatformtheme.cpp#L548-L563 [3]https://github.com/qt/qtbase/blob/v5.12.9/src/plugins/platforms/android/qandroidplatformtheme.cpp#L469
- Loading branch information