summaryrefslogtreecommitdiff
path: root/previewer/ev-previewer-window.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 /previewer/ev-previewer-window.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 'previewer/ev-previewer-window.c')
-rw-r--r--previewer/ev-previewer-window.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/previewer/ev-previewer-window.c b/previewer/ev-previewer-window.c
index 1979d954..38848e39 100644
--- a/previewer/ev-previewer-window.c
+++ b/previewer/ev-previewer-window.c
@@ -139,6 +139,14 @@ ev_previewer_window_zoom_out (GtkAction *action,
}
static void
+ev_previewer_window_zoom_reset (GtkAction *action,
+ EvPreviewerWindow *window)
+{
+ ev_document_model_set_sizing_mode (window->model, EV_SIZING_FREE);
+ ev_view_zoom_reset (window->view);
+}
+
+static void
ev_previewer_window_zoom_fit_page (GtkToggleAction *action,
EvPreviewerWindow *window)
{
@@ -284,6 +292,9 @@ static const GtkActionEntry action_entries[] = {
{ "ViewZoomOut", "zoom-out", N_("Zoom _Out"), "<control>minus",
N_("Shrink the document"),
G_CALLBACK (ev_previewer_window_zoom_out) },
+ { "ViewZoomReset", "zoom-original", NULL, "<control>0",
+ N_("Reset zoom to 100\%"),
+ G_CALLBACK (ev_previewer_window_zoom_reset) },
#if GTKUNIXPRINT_ENABLED
/* translators: Print document currently shown in the Print Preview window */
{ "PreviewPrint", "document-print", N_("Print"), NULL,