diff options
author | Bert <ber.t@gmx.com> | 2011-02-26 13:16:14 +0100 |
---|---|---|
committer | Bert <ber.t@gmx.com> | 2011-02-26 13:16:14 +0100 |
commit | 5a35484e715d33763472ea473096a40b87ed126c (patch) | |
tree | 00ae9050b749241cec8b222f352fceb7d84ea62f /image.c | |
parent | dafe7eac742301952c088d68a455586b0225a7bd (diff) | |
download | nsxiv-5a35484e715d33763472ea473096a40b87ed126c.tar.zst |
Align big images on top-left corner
Diffstat (limited to 'image.c')
-rw-r--r-- | image.c | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -162,7 +162,14 @@ void img_render(img_t *img, win_t *win) { if (!img->re) { /* rendered for the first time */ img->re = 1; - img_center(img, win); + if (img->zoom * img->w <= win->w) + img->x = (win->w - img->w * img->zoom) / 2; + else + img->x = 0; + if (img->zoom * img->h <= win->h) + img->y = (win->h - img->h * img->zoom) / 2; + else + img->y = 0; } if (img->checkpan) { |