summaryrefslogtreecommitdiff
path: root/src/events.c
diff options
context:
space:
mode:
authorAlec C <avlecxk@gmail.com>2021-03-03 12:02:26 -0800
committerGitHub <noreply@github.com>2021-03-03 21:02:26 +0100
commitb2ce6d8b85cd05964f509c4e00587ac58e3696f3 (patch)
tree707c1139464fc3d6759f55509170c4fbd7cf8256 /src/events.c
parentc91c5ba3f3c374eb4c59327bdf7576bfe1e776f7 (diff)
Option Refactor and addition of Zoom Rate (#589)
* fixed for simpler parenthesis matching * absolute file path for .fehbg, moved script creation into helper function * Removed unused variable. * added early exit condition as per Ferada's suggestion * Added enum for options to improve readability * migrated options to enum. * added support for zoom specification through options * added man entry for zoom-rate * added help entry for zoom-rate commands * updated man to have warnings about strange values for zoom options * fix memory leak (free exec_absolute_path) * added detection for path vs env PATH launch for use in .fehbg script gen. * Added enum for options to improve readability * migrated options to enum. * added support for zoom specification through options * added man entry for zoom-rate * added help entry for zoom-rate commands * updated man to have warnings about strange values for zoom options * Update help.raw removed zoom-in/out * removed zoom-in/out from options * updated man/help entry to remove in/out zoom specification * sanitize --zoom-rate in options parser; use a single variable for storing it Co-authored-by: Daniel Friesel <derf@finalrewind.org>
Diffstat (limited to 'src/events.c')
-rw-r--r--src/events.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/events.c b/src/events.c
index c44ebf4..5bb2ecf 100644
--- a/src/events.c
+++ b/src/events.c
@@ -255,7 +255,7 @@ static void feh_event_handle_ButtonPress(XEvent * ev)
- winwid->im_y) / winwid->old_zoom;
/* copied from zoom_in, keyevents.c */
- winwid->zoom = winwid->zoom * 1.25;
+ winwid->zoom = winwid->zoom * opt.zoom_rate;
if (winwid->zoom > ZOOM_MAX)
winwid->zoom = ZOOM_MAX;
@@ -283,7 +283,7 @@ static void feh_event_handle_ButtonPress(XEvent * ev)
- winwid->im_y) / winwid->old_zoom;
/* copied from zoom_out, keyevents.c */
- winwid->zoom = winwid->zoom * 0.80;
+ winwid->zoom = winwid->zoom / opt.zoom_rate;
if (winwid->zoom < ZOOM_MIN)
winwid->zoom = ZOOM_MIN;