Commit c274eafe authored by Ernie Ewert's avatar Ernie Ewert
Browse files

Added a "zoom fit" key binding for the current image.

Fixed(?) Makefile document build issue for README.md
parent 215732ab
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -51,8 +51,8 @@ install-man:
install-doc:
	@echo installing docs to ${doc_dir}
	@mkdir -p ${doc_dir}
	@cp AUTHORS ChangeLog README TODO ${doc_dir}
	@chmod 644 ${doc_dir}/AUTHORS ${doc_dir}/ChangeLog ${doc_dir}/README \
	@cp AUTHORS ChangeLog README.md TODO ${doc_dir}
	@chmod 644 ${doc_dir}/AUTHORS ${doc_dir}/ChangeLog ${doc_dir}/README.md \
		${doc_dir}/TODO

install-bin:
+13 −3
Original line number Diff line number Diff line
@@ -439,6 +439,8 @@ fehkey *feh_str_to_kb(char *action)
		return &keys.zoom_default;
	else if (!strcmp(action, "zoom_fit"))
		return &keys.zoom_fit;
	else if (!strcmp(action, "zoom_fill"))
		return &keys.zoom_fill;
	else if (!strcmp(action, "size_to_image"))
		return &keys.size_to_image;
	else if (!strcmp(action, "render"))
@@ -653,6 +655,14 @@ void feh_event_handle_generic(winwidget winwid, unsigned int state, KeySym keysy
		winwidget_center_image(winwid);
		winwidget_render_image(winwid, 0, 0);
	}
	else if (feh_is_kp(&keys.zoom_fill, state, keysym, button)) {
		int save_zoom = opt.zoom_mode;
		opt.zoom_mode = ZOOM_MODE_FILL;
		feh_calc_needed_zoom(&winwid->zoom, winwid->im_w, winwid->im_h, winwid->w, winwid->h);
		winwidget_center_image(winwid);
		winwidget_render_image(winwid, 0, 0);
		opt.zoom_mode = save_zoom;
	}
	else if (feh_is_kp(&keys.render, state, keysym, button)) {
		if (winwid->type == WIN_TYPE_THUMBNAIL)
			feh_thumbnail_show_selected();
+1 −0
Original line number Diff line number Diff line
@@ -175,6 +175,7 @@ struct __fehkb {
	struct __fehkey zoom_out;
	struct __fehkey zoom_default;
	struct __fehkey zoom_fit;
	struct __fehkey zoom_fill;
	struct __fehkey render;
	struct __fehkey toggle_actions;
	struct __fehkey toggle_filenames;