aboutsummaryrefslogtreecommitdiffstats
path: root/config.def.h
diff options
context:
space:
mode:
authorLu Xu <oliver_lew@outlook.com>2021-09-25 07:10:29 +0200
committerNRK <nrk@disroot.org>2021-09-25 07:11:21 +0200
commita2339e70fdac1db7453cb008c4e37acdb5468f02 (patch)
tree780514236448a1625709c2dd86a4f0ec553920b2 /config.def.h
parent696f68753f1b85299f64592f9cc57c2e77d914f1 (diff)
downloadnsxiv-a2339e70fdac1db7453cb008c4e37acdb5468f02.tar.zst
Use zoom steps instead of hard-coding levels (#92)
Co-authored-by: NRK <nrk@disroot.org> Co-authored-by: Berke Kocaoğlu <berke.kocaoglu@metu.edu.tr>
Diffstat (limited to 'config.def.h')
-rw-r--r--config.def.h11
1 files changed, 4 insertions, 7 deletions
diff --git a/config.def.h b/config.def.h
index 0645b2b..19ea7bb 100644
--- a/config.def.h
+++ b/config.def.h
@@ -25,13 +25,10 @@ static const suffixmode_t TITLE_SUFFIXMODE = SUFFIX_BASENAME;
#endif
#ifdef _IMAGE_CONFIG
-/* levels (in percent) to use when zooming via '-' and '+':
- * (first/last value is used as min/max zoom level)
- */
-static const float zoom_levels[] = {
- 12.5, 25.0, 50.0, 75.0,
- 100.0, 150.0, 200.0, 400.0, 800.0
-};
+/* zoom level of 1.0 means 100% */
+static const float ZOOM_MIN = 0.01;
+static const float ZOOM_MAX = 20.0;
+static const float ZOOM_STEP = 1.2599210498948732; /* 2^(1/3) */
/* default slideshow delay (in sec, overwritten via -S option): */
static const int SLIDESHOW_DELAY = 5;