diff options
author | Peter Hofmann <scm@uninformativ.de> | 2014-11-09 14:05:59 +0100 |
---|---|---|
committer | Peter Hofmann <scm@uninformativ.de> | 2014-11-09 14:06:52 +0100 |
commit | 2a9df55c6f67c1c57b99ff2a4a56ef3f1fd76fcd (patch) | |
tree | 38a757324db745d67ef7d925dead07a9775dd715 | |
parent | c076343ece1c7aff8bd7b63ef4b232d950281df5 (diff) | |
download | lariza-2a9df55c6f67c1c57b99ff2a4a56ef3f1fd76fcd.tar.gz |
Improve mouse wheel zoom and update README
-rw-r--r-- | README | 7 | ||||
-rw-r--r-- | browser.c | 6 |
2 files changed, 7 insertions, 6 deletions
@@ -165,12 +165,15 @@ Main windows Backward / forward (mouse keys 8 and 9) Does the obvious. - Mod1 + Wheel up or Ctrl + Wheel up + Mod1 + Scroll up or Ctrl + Scroll up Increase zoom level of the current page. - Mod1 + Wheel down or Ctrl + Wheel down + Mod1 + Scroll down or Ctrl + Scroll down Decrase zoom level of the current page. + Mod1 + Scroll horizontally or Ctrl + Scroll horizontally + Reset zoom to $LARIZA_ZOOM. + When the location bar is focused: @@ -714,10 +714,8 @@ key_web_view(GtkWidget *widget, GdkEvent *event, gpointer data) { gdk_event_get_scroll_deltas(event, &dx, &dy); z = webkit_web_view_get_zoom_level(WEBKIT_WEB_VIEW(c->web_view)); - if (dy == 1) - z += 0.1; - else if (dy == -1) - z -= 0.1; + z += -dy * 0.1; + z = dx != 0 ? global_zoom : z; webkit_web_view_set_zoom_level(WEBKIT_WEB_VIEW(c->web_view), z); return TRUE; } |