[libadwaita/wip/exalm/scroll: 1/2] swipe-tracker: Remove scroll multiplier for GTK 4.7.0+
- From: Alexander Mikhaylenko <alexm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libadwaita/wip/exalm/scroll: 1/2] swipe-tracker: Remove scroll multiplier for GTK 4.7.0+
- Date: Fri, 22 Jul 2022 17:31:05 +0000 (UTC)
commit 02f61b58f11ce23f9d48449d1c10e074c77723af
Author: Alexander Mikhaylenko <alexm gnome org>
Date: Fri Jul 22 21:23:46 2022 +0400
swipe-tracker: Remove scroll multiplier for GTK 4.7.0+
Deltas don't contain it anymore.
src/adw-swipe-tracker.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
---
diff --git a/src/adw-swipe-tracker.c b/src/adw-swipe-tracker.c
index 244f6100..2ab3b0d8 100644
--- a/src/adw-swipe-tracker.c
+++ b/src/adw-swipe-tracker.c
@@ -15,7 +15,6 @@
#define TOUCHPAD_BASE_DISTANCE_H 400
#define TOUCHPAD_BASE_DISTANCE_V 300
#define EVENT_HISTORY_THRESHOLD_MS 150
-#define SCROLL_MULTIPLIER 10
#define MIN_ANIMATION_DURATION 100
#define MAX_ANIMATION_DURATION 400
#define VELOCITY_THRESHOLD_TOUCH 0.3
@@ -29,6 +28,12 @@
#define DRAG_THRESHOLD_DISTANCE 16
#define EPSILON 0.005
+#if GTK_CHECK_VERSION (4, 7, 0)
+#define SCROLL_MULTIPLIER 1
+#else
+#define SCROLL_MULTIPLIER 10
+#endif
+
#define SIGN(x) ((x) > 0.0 ? 1.0 : ((x) < 0.0 ? -1.0 : 0.0))
/**
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]