[gtk+] zoom scrolling: avoid 'jumping back'
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] zoom scrolling: avoid 'jumping back'
- Date: Mon, 23 Feb 2015 11:46:30 +0000 (UTC)
commit 8726c6d5d239a342f0267d1c2bf0c90fb051d7fb
Author: Matthias Clasen <mclasen redhat com>
Date: Mon Feb 23 06:42:17 2015 -0500
zoom scrolling: avoid 'jumping back'
We record the starting position on button press, but only
start the zoom mode when the long press timeout kicks in.
Depending on circumstances, this can cause a noticable jump.
Avoid this by resetting the recorded starting position after
the long press timeout. Suggested by Sebastian Keller.
gtk/gtkrange.c | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtkrange.c b/gtk/gtkrange.c
index 404dc3a..bd95ee9 100644
--- a/gtk/gtkrange.c
+++ b/gtk/gtkrange.c
@@ -2437,7 +2437,12 @@ gtk_range_long_press_gesture_pressed (GtkGestureLongPress *gesture,
gdouble y,
GtkRange *range)
{
- update_zoom_state (range, TRUE);
+ if (!range->priv->zoom)
+ {
+ /* unset initial position so it can be calculated */
+ range->priv->slide_initial_slider_position = -1;
+ update_zoom_state (range, TRUE);
+ }
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]