]> git.cworth.org Git - acre/blobdiff - acre-x.c
acre-x: Fix zooming so that zoom-in and zoom-out use the same amounts
[acre] / acre-x.c
index 194926a0ae7e8502d1a75f2903698950c74e486e..c375c36efddee95a1d7afd4e74262a3d740f4cbd 100644 (file)
--- a/acre-x.c
+++ b/acre-x.c
@@ -154,7 +154,7 @@ handle_events(Display *dpy, Window window, Visual *visual,
                        }
                        else if (keycode == minus_code)
                        {
-                               shift = (1- 2*ZOOM) * (x_max - x_min);
+                               shift = (ZOOM/(1 - 2 * ZOOM)) * (x_max - x_min);
                                x_min -= shift;
                                x_max += shift;
                        }