summaryrefslogtreecommitdiff
path: root/libview/ev-web-view.c
diff options
context:
space:
mode:
authorLars Mueller <[email protected]>2017-08-30 14:57:59 +0200
committerraveit65 <[email protected]>2018-03-16 18:03:35 +0100
commit7619dc678fcc3e64ccefb0565517ca6f14554550 (patch)
treee697ff52f46dbbe1f747e57819785362f64dcf52 /libview/ev-web-view.c
parent58e7446290d78e0744a5193e22bfa300e6737829 (diff)
downloadatril-7619dc678fcc3e64ccefb0565517ca6f14554550.tar.bz2
atril-7619dc678fcc3e64ccefb0565517ca6f14554550.tar.xz
Add zoom reset
origin commit: https://github.com/linuxmint/xreader/commit/43acb8f
Diffstat (limited to 'libview/ev-web-view.c')
-rw-r--r--libview/ev-web-view.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/libview/ev-web-view.c b/libview/ev-web-view.c
index 6e302660..5a101f6b 100644
--- a/libview/ev-web-view.c
+++ b/libview/ev-web-view.c
@@ -687,6 +687,17 @@ ev_web_view_zoom_out(EvWebView *webview)
return TRUE;
}
+gboolean
+ev_web_view_zoom_reset(EvWebView *webview)
+{
+ if (webview->zoom_level == 1)
+ return FALSE;
+
+ webkit_web_view_set_zoom_level (WEBKIT_WEB_VIEW(webview),
+ 1.0);
+ return TRUE;
+}
+
/**
* ev_web_view_disconnect_handlers
* @webview : #EvWebView instance