mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-16 06:07:06 +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;
|
||||
const auto diffXtoY = std::abs(args.delta.x())
|
||||
- std::abs(args.delta.y());
|
||||
if (diffXtoY > 0) {
|
||||
constexpr auto kOrientationThreshold = 1.;
|
||||
if (diffXtoY > kOrientationThreshold) {
|
||||
setOrientation(Qt::Horizontal);
|
||||
} else if (diffXtoY < 0) {
|
||||
} else if (diffXtoY < -kOrientationThreshold) {
|
||||
setOrientation(Qt::Vertical);
|
||||
} else {
|
||||
setOrientation(std::nullopt);
|
||||
|
|
Loading…
Add table
Reference in a new issue