summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README7
-rw-r--r--browser.c6
2 files changed, 7 insertions, 6 deletions
diff --git a/README b/README
index ae4e66b..9f69486 100644
--- a/README
+++ b/README
@@ -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:
diff --git a/browser.c b/browser.c
index 8cf663f..cf8d2a0 100644
--- a/browser.c
+++ b/browser.c
@@ -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;
}