summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2011-10-31 10:08:33 +0100
committerDaniel Friesel <derf@finalrewind.org>2011-10-31 10:08:33 +0100
commite16222868dbe7a09c79418162b7fefbd194b6b8d (patch)
tree98ef035c8b44675637a3baed49e33803a218e8c3
parent5d73b0934c8c6c9ef9610e31c5b79d216af51d8e (diff)
Experimental --auto-zoom tiling support (use -.Z for best results)
-rw-r--r--ChangeLog2
-rw-r--r--src/winwidget.c6
2 files changed, 7 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 9bfbf0c..ace33d2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,6 @@
git HEAD
- * Experimental --scale-down tiling support (see #54)
+ * Experimental --scale-down and --auto-zoom tiling support (see #54)
* Fix http image load for long image names (closes debian #646421)
Mon, 10 Oct 2011 12:25:00 +0200 Daniel Friesel <derf@finalrewind.org>
diff --git a/src/winwidget.c b/src/winwidget.c
index c678d5b..ed7002a 100644
--- a/src/winwidget.c
+++ b/src/winwidget.c
@@ -416,6 +416,12 @@ void winwidget_render_image(winwidget winwid, int resize, int force_alias)
|| (winwid->has_rotated)))
feh_draw_checks(winwid);
+ if (!winwid->full_screen && opt.zoom_mode
+ && (winwid->zoom == 1.0) && !opt.geom_flags
+ && (winwid->w > winwid->im_w) && (winwid->h > winwid->im_h))
+ feh_calc_needed_zoom(&(winwid->zoom), winwid->im_w, winwid->im_h, winwid->w, winwid->h);
+
+
if (resize && (winwid->full_screen || opt.geom_flags)) {
int smaller; /* Is the image smaller than screen? */
int max_w = 0, max_h = 0;