Do not apply --scale-down to a thumbnail window

(upstream git commit 7c00adf853acc76520d43a12eb63ec151924d5ab)
This commit is contained in:
dcoppa 2012-12-05 13:44:35 +00:00
parent 94d7a92386
commit e001ef090a
3 changed files with 44 additions and 5 deletions

View File

@ -1,8 +1,9 @@
# $OpenBSD: Makefile,v 1.45 2012/10/16 13:22:10 dcoppa Exp $
# $OpenBSD: Makefile,v 1.46 2012/12/05 13:44:35 dcoppa Exp $
COMMENT= lightweight image viewer
DISTNAME= feh-2.7
REVISION= 0
EXTRACT_SUFX= .tar.bz2
CATEGORIES= graphics

View File

@ -1,7 +1,20 @@
$OpenBSD: patch-man_feh_pre,v 1.18 2012/10/16 13:22:10 dcoppa Exp $
$OpenBSD: patch-man_feh_pre,v 1.19 2012/12/05 13:44:35 dcoppa Exp $
--- man/feh.pre.orig Tue Oct 16 06:31:41 2012
+++ man/feh.pre Tue Oct 16 15:19:32 2012
@@ -895,7 +895,7 @@ which
+++ man/feh.pre Wed Dec 5 15:26:34 2012
@@ -558,8 +558,10 @@ theme.
Same as Index mode, but the thumbnails are clickable image launchers.
Note that
.Cm --fullscreen
-does not affect the thumbnail window. It does, however, work for the image
-windows launched from thumbnail mode.
+and
+.Cm --scale-down
+do not affect the thumbnail window. They do, however, work for image windows
+launched from thumbnail mode.
Also supports
.Sx MONTAGE MODE OPTIONS .
.
@@ -895,7 +897,7 @@ which
defaults to
.Pa ~/.config/feh/ .
If the files are not found in that directory, it will also try
@ -10,7 +23,7 @@ $OpenBSD: patch-man_feh_pre,v 1.18 2012/10/16 13:22:10 dcoppa Exp $
.Pp
All config files treat lines starting with a
.Qq #
@@ -1432,7 +1432,7 @@ order it finds them on the hard disk, which is usually
@@ -1432,7 +1434,7 @@ order it finds them on the hard disk, which is usually
.
Show 128x128 pixel thumbnails, limit window width to 1024 pixels.
.

View File

@ -0,0 +1,25 @@
$OpenBSD: patch-src_winwidget_c,v 1.11 2012/12/05 13:44:35 dcoppa Exp $
Do not apply --scale-down to a thumbnail window
(upstream git commit 7c00adf853acc76520d43a12eb63ec151924d5ab)
--- src/winwidget.c.orig Tue Oct 16 06:31:41 2012
+++ src/winwidget.c Wed Dec 5 15:26:34 2012
@@ -402,6 +402,7 @@ void winwidget_render_image(winwidget winwid, int resi
if (!winwid->full_screen && opt.scale_down && ((winwid->w < winwid->im_w)
|| (winwid->h < winwid->im_h)) &&
+ (winwid->type != WIN_TYPE_THUMBNAIL) &&
(winwid->old_zoom == 1.0)) {
D(("scaling down image %dx%d\n", winwid->w, winwid->h));
@@ -512,7 +513,8 @@ void winwidget_render_image(winwidget winwid, int resi
winwid->im_y = (int) (max_h - (winwid->im_h * winwid->zoom)) >> 1;
}
}
- else if (need_center && !winwid->full_screen && opt.scale_down) {
+ else if (need_center && !winwid->full_screen && opt.scale_down
+ && (winwid->type != WIN_TYPE_THUMBNAIL)) {
winwid->im_x = (int) (winwid->w - (winwid->im_w * winwid->zoom)) >> 1;
winwid->im_y = (int) (winwid->h - (winwid->im_h * winwid->zoom)) >> 1;
}