Browse Source

Build-time option for default thumbnail size; fixes issue #207

master
Bert Münnich 9 years ago
parent
commit
de4649fc28
3 changed files with 6 additions and 3 deletions
  1. +1
    -1
      Makefile
  2. +3
    -0
      config.def.h
  3. +2
    -2
      thumbs.c

+ 1
- 1
Makefile View File

@@ -1,4 +1,4 @@
VERSION := git-20151028
VERSION := git-20151220


PREFIX := /usr/local PREFIX := /usr/local
MANPREFIX := $(PREFIX)/share/man MANPREFIX := $(PREFIX)/share/man


+ 3
- 0
config.def.h View File

@@ -56,6 +56,9 @@ static const bool ALPHA_LAYER = false;
/* thumbnail sizes in pixels (width == height): */ /* thumbnail sizes in pixels (width == height): */
static const int thumb_sizes[] = { 32, 64, 96, 128, 160 }; 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 #endif
#ifdef _MAPPINGS_CONFIG #ifdef _MAPPINGS_CONFIG




+ 2
- 2
thumbs.c View File

@@ -170,8 +170,8 @@ void tns_init(tns_t *tns, fileinfo_t *files, const int *cnt, int *sel,
tns->win = win; tns->win = win;
tns->dirty = false; 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') { if ((homedir = getenv("XDG_CACHE_HOME")) == NULL || homedir[0] == '\0') {
homedir = getenv("HOME"); homedir = getenv("HOME");


Loading…
Cancel
Save