]> spindle.queued.net Git - midori/commitdiff
Adjust mouse wheel zooming to do the same as keyboard shortcuts
authorChristian Dywan <christian@twotoasts.de>
Tue, 7 Apr 2009 00:39:11 +0000 (02:39 +0200)
committerChristian Dywan <christian@twotoasts.de>
Tue, 7 Apr 2009 00:39:11 +0000 (02:39 +0200)
midori/midori-view.c

index 4c6fcf5eac2c8fdd9d2c55c7fc8e04cd858507b2..e2608a49a9d1a50138dd892f2a565146bc929120 100644 (file)
@@ -866,9 +866,11 @@ gtk_widget_scroll_event_cb (WebKitWebView*  web_view,
     if (event->state & GDK_CONTROL_MASK)
     {
         if (event->direction == GDK_SCROLL_DOWN)
-            webkit_web_view_zoom_out (WEBKIT_WEB_VIEW (web_view));
+            midori_view_set_zoom_level (view,
+                midori_view_get_zoom_level (view) - 0.25f);
         else if(event->direction == GDK_SCROLL_UP)
-            webkit_web_view_zoom_in (WEBKIT_WEB_VIEW (web_view));
+            midori_view_set_zoom_level (view,
+                midori_view_get_zoom_level (view) + 0.25f);
         return TRUE;
     }
     else