[shotwell] Try to improve zooming with scrolling guesture



commit 35f61764a3a6af616e628deb91f05c4b24718d0b
Author: Jens Georg <mail jensge org>
Date:   Sun Oct 28 19:25:00 2018 +0100

    Try to improve zooming with scrolling guesture
    
    Follows along this change in GIMP:
    
    https://gitlab.gnome.org/GNOME/gimp/commit/8b71d326597c7cde985392859d4083fac8bb1ebf
    
    Fixes #73

 src/Page.vala | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/src/Page.vala b/src/Page.vala
index ea76ac15..7b787935 100644
--- a/src/Page.vala
+++ b/src/Page.vala
@@ -1032,16 +1032,16 @@ public abstract class Page : Gtk.ScrolledWindow {
                     double dx, dy;
                     event.get_scroll_deltas(out dx, out dy);
 
-                    if (dy < 0)
+                    if (dy <= -1.0)
                         return on_mousewheel_up(event);
-                    else if (dy > 0)
+                    else if (dy >= 1.0)
                         return on_mousewheel_down(event);
-                    else if (dx < 0)
+                    else if (dx <= -1.0)
                         return on_mousewheel_left(event);
-                    else if (dx > 0)
+                    else if (dx >= 1.0)
                         return on_mousewheel_right(event);
                     else
-                        return false;
+                        return true;
                 }
            
             default:


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]