aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBert Münnich <ber.t@posteo.de>2015-12-20 13:10:24 +0100
committerBert Münnich <ber.t@posteo.de>2015-12-20 13:10:39 +0100
commitde4649fc283afc4e3c8b9aefab2f89d1c83803b1 (patch)
treebb800494716622b03e9633beb42791820bcb646c
parenta7d39b0ab8fabb4f6417bb69a4e70d9da598d1aa (diff)
Build-time option for default thumbnail size; fixes issue #207
-rw-r--r--Makefile2
-rw-r--r--config.def.h3
-rw-r--r--thumbs.c4
3 files changed, 6 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index 5cae7bd..0116999 100644
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,4 @@
-VERSION := git-20151028
+VERSION := git-20151220
PREFIX := /usr/local
MANPREFIX := $(PREFIX)/share/man
diff --git a/config.def.h b/config.def.h
index ac32bd7..f3cc71e 100644
--- a/config.def.h
+++ b/config.def.h
@@ -56,6 +56,9 @@ static const bool ALPHA_LAYER = false;
/* thumbnail sizes in pixels (width == height): */
static const int thumb_sizes[] = { 32, 64, 96, 128, 160 };
+/* thumbnail size at startup, index into thumb_sizes[]: */
+static const int THUMB_SIZE = 3;
+
#endif
#ifdef _MAPPINGS_CONFIG
diff --git a/thumbs.c b/thumbs.c
index c4cc130..bfce2ff 100644
--- a/thumbs.c
+++ b/thumbs.c
@@ -170,8 +170,8 @@ void tns_init(tns_t *tns, fileinfo_t *files, const int *cnt, int *sel,
tns->win = win;
tns->dirty = false;
- tns->zl = 0;
- tns_zoom(tns, 1);
+ tns->zl = THUMB_SIZE;
+ tns_zoom(tns, 0);
if ((homedir = getenv("XDG_CACHE_HOME")) == NULL || homedir[0] == '\0') {
homedir = getenv("HOME");