diff options
Diffstat (limited to 'src/thumbnail.c')
-rw-r--r-- | src/thumbnail.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/src/thumbnail.c b/src/thumbnail.c index c472fc0..f4304af 100644 --- a/src/thumbnail.c +++ b/src/thumbnail.c @@ -278,14 +278,12 @@ void init_thumbnail_mode(void) break; } - if (opt.aspect) { - xxx = x + ((opt.thumb_w - www) / 2); - yyy = y + ((opt.thumb_h - hhh) / 2); - } else { - /* Ignore the aspect ratio and squash the image in */ - xxx = x; - yyy = y; - } + /* center image relative to the text below it (if any) */ + xxx = x + ((td.text_area_w - www) / 2); + yyy = y; + + if (opt.aspect) + yyy += (opt.thumb_h - hhh) / 2; /* Draw now */ gib_imlib_blend_image_onto_image(td.im_main, |