diff options
author | Daniel Friesel <derf@finalrewind.org> | 2011-10-21 18:51:06 +0200 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2011-10-21 18:51:06 +0200 |
commit | c9a7b4d88e109e52a6395573336af7ac33b60baa (patch) | |
tree | 849d75d9780a8b97c1e3e172de228b9f754ea70e /src | |
parent | 4947bd2277cf8772efc392303e47190b4de3292b (diff) | |
download | feh-c9a7b4d88e109e52a6395573336af7ac33b60baa.zip |
winwidget.c: Add experimental --scale-down tiling support (#54)
Diffstat (limited to 'src')
-rw-r--r-- | src/winwidget.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/winwidget.c b/src/winwidget.c index bc530ee..c678d5b 100644 --- a/src/winwidget.c +++ b/src/winwidget.c @@ -381,6 +381,7 @@ void winwidget_render_image(winwidget winwid, int resize, int force_alias) int sx, sy, sw, sh, dx, dy, dw, dh; int calc_w, calc_h; int antialias = 0; + int need_center = winwid->had_resize; if (!winwid->full_screen && resize) { winwidget_resize(winwid, winwid->im_w, winwid->im_h); @@ -503,6 +504,10 @@ void winwidget_render_image(winwidget winwid, int resize, int force_alias) winwid->im_y = (int) (max_h - (winwid->im_h * winwid->zoom)) >> 1; } } + else if (need_center && !winwid->full_screen && opt.scale_down) { + winwid->im_x = (int) (winwid->w - (winwid->im_w * winwid->zoom)) >> 1; + winwid->im_y = (int) (winwid->h - (winwid->im_h * winwid->zoom)) >> 1; + } /* Now we ensure only to render the area we're looking at */ dx = winwid->im_x; |