mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +02:00
Weakened gesture orientation check within swipe-to-reply.
This commit is contained in:
parent
dd100fb709
commit
89c2ba4293
1 changed files with 3 additions and 2 deletions
|
@ -110,9 +110,10 @@ void SetupSwipeHandler(
|
||||||
state->delta = args.delta;
|
state->delta = args.delta;
|
||||||
const auto diffXtoY = std::abs(args.delta.x())
|
const auto diffXtoY = std::abs(args.delta.x())
|
||||||
- std::abs(args.delta.y());
|
- std::abs(args.delta.y());
|
||||||
if (diffXtoY > 0) {
|
constexpr auto kOrientationThreshold = 1.;
|
||||||
|
if (diffXtoY > kOrientationThreshold) {
|
||||||
setOrientation(Qt::Horizontal);
|
setOrientation(Qt::Horizontal);
|
||||||
} else if (diffXtoY < 0) {
|
} else if (diffXtoY < -kOrientationThreshold) {
|
||||||
setOrientation(Qt::Vertical);
|
setOrientation(Qt::Vertical);
|
||||||
} else {
|
} else {
|
||||||
setOrientation(std::nullopt);
|
setOrientation(std::nullopt);
|
||||||
|
|
Loading…
Add table
Reference in a new issue