diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/web-view.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/web-view.c b/src/web-view.c index ebebcba..c7128c3 100644 --- a/src/web-view.c +++ b/src/web-view.c @@ -745,6 +745,9 @@ mq_web_view_zoom_in(MqWebView *web_view) zoom_level = webkit_web_view_get_zoom_level(WEBKIT_WEB_VIEW(web_view)); zoom_level += 0.1; + if (zoom_level < 0) { + zoom_level = G_MAXDOUBLE; + } webkit_web_view_set_zoom_level(WEBKIT_WEB_VIEW(web_view), zoom_level); } @@ -755,6 +758,9 @@ mq_web_view_zoom_out(MqWebView *web_view) zoom_level = webkit_web_view_get_zoom_level(WEBKIT_WEB_VIEW(web_view)); zoom_level -= 0.1; + if (zoom_level < 0) { + zoom_level = 0; + } webkit_web_view_set_zoom_level(WEBKIT_WEB_VIEW(web_view), zoom_level); } |