diff options
author | Daniel Friesel <derf@finalrewind.org> | 2011-10-01 22:42:09 +0200 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2011-10-01 22:42:09 +0200 |
commit | f55de5185347da52e7cd282491afdc7114418e50 (patch) | |
tree | 1d95f3da940a39f84c53c96b7a9ae5a887792dee /src/index.c | |
parent | eff624290d52d526e4db834b40aff08f1c1db069 (diff) |
index.c, thumbnail.c: Fix alignment issues
Diffstat (limited to 'src/index.c')
-rw-r--r-- | src/index.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/index.c b/src/index.c index 580585d..d9e068a 100644 --- a/src/index.c +++ b/src/index.c @@ -153,6 +153,10 @@ void init_index_mode(void) get_index_string_dim(file, fn, &fw, &fh); if (fw > text_area_w) text_area_w = fw; + if (fh > text_area_h) { + text_area_h = fh + 5; + tot_thumb_h = opt.thumb_h + text_area_h; + } } if (text_area_w > opt.thumb_w) text_area_w += 5; @@ -186,6 +190,10 @@ void init_index_mode(void) get_index_string_dim(file, fn, &fw, &fh); if (fw > text_area_w) text_area_w = fw; + if (fh > text_area_h) { + text_area_h = fh + 5; + tot_thumb_h = opt.thumb_h + text_area_h; + } } if (text_area_w > opt.thumb_w) text_area_w += 5; @@ -214,6 +222,10 @@ void init_index_mode(void) get_index_string_dim(file, fn, &fw, &fh); if (fw > text_area_w) text_area_w = fw; + if (fh > text_area_h) { + text_area_h = fh + 5; + tot_thumb_h = opt.thumb_h + text_area_h; + } } if (text_area_w > opt.thumb_w) @@ -438,7 +450,7 @@ void get_index_string_dim(feh_file *file, Imlib_Font fn, int *fw, int *fh) int line_w, line_h; char fake_file = 0; gib_list *line, *lines; - static int max_w = 0, total_h = 0; + int max_w = 0, total_h = 0; if (!opt.index_info) return; |