summaryrefslogtreecommitdiffstats
path: root/image.c
diff options
context:
space:
mode:
authorjcalve <jcalve@git.invalid>2017-07-23 02:15:47 +0200
committerBert Münnich <ber.t@posteo.de>2017-09-06 19:39:22 +0200
commitec545a6b6c3339edfd0536a2af4cb7e91888285f (patch)
tree323ff86210a41fe7e9f5c7b715e992d73c34f629 /image.c
parent30e9ec89709f32f8ab4b245c4e6e514c81df2ed6 (diff)
downloadnsxiv-ec545a6b6c3339edfd0536a2af4cb7e91888285f.tar.zst
Make pan fraction configurable
Diffstat (limited to 'image.c')
-rw-r--r--image.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/image.c b/image.c
index 6967b3d..36a232e 100644
--- a/image.c
+++ b/image.c
@@ -590,7 +590,7 @@ bool img_move(img_t *img, float dx, float dy)
bool img_pan(img_t *img, direction_t dir, int d)
{
/* d < 0: screen-wise
- * d = 0: 1/5 of screen
+ * d = 0: 1/PAN_FRACTION of screen
* d > 0: num of pixels
*/
float x, y;
@@ -598,8 +598,8 @@ bool img_pan(img_t *img, direction_t dir, int d)
if (d > 0) {
x = y = MAX(1, (float) d * img->zoom);
} else {
- x = img->win->w / (d < 0 ? 1 : 5);
- y = img->win->h / (d < 0 ? 1 : 5);
+ x = img->win->w / (d < 0 ? 1 : PAN_FRACTION);
+ y = img->win->h / (d < 0 ? 1 : PAN_FRACTION);
}
switch (dir) {