Commit ccbebcbd authored by Birte Kristina Friesel's avatar Birte Kristina Friesel
Browse files

Add up arrow / down arrow for zooming

parent eb06701e
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -631,9 +631,9 @@ Move the image up
Move the image down
.It Aq keypad begin
Antialias the image
.It Aq keypad +
.It Ao keypad + Ac , Ao up arrow Ac
Zoom in
.It Aq keypad -
.It Ao keypad - Ac , Ao down arrow Ac
Zoom out
.It Aq keypad *
Zoom to 100%
+7 −4
Original line number Diff line number Diff line
@@ -258,17 +258,20 @@ void feh_event_handle_keypress(XEvent * ev)
		winwidget_render_image(winwid, 0, 0);
		break;
	case XK_KP_Add:
	case XK_Up:
		/* erroneously recognized as '+' in the *kbuf switch. Work around this. */
		len = 0;
		winwid->zoom = winwid->zoom * 1.25;
		winwidget_sanitise_offsets(winwid);
		winwidget_render_image(winwid, 0, 0);
		/* TODO: Center only around current view */
		winwidget_center_image(winwid);
		winwidget_render_image(winwid, 0, 1);
		break;
	case XK_KP_Subtract:
	case XK_Down:
		len = 0;
		winwid->zoom = winwid->zoom * 0.75;
		winwidget_sanitise_offsets(winwid);
		winwidget_render_image(winwid, 0, 0);
		winwidget_center_image(winwid);
		winwidget_render_image(winwid, 0, 1);
		break;
	case XK_KP_Multiply:
		len = 0;