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-15 19:11:11 +0100
commit580e4fa77018dc57cfd88e229fb21b1d87dfd3dd (patch)
treebef8430bcffd40808f1b578fdfdc49005b2947cb /previewer/ev-previewer-window.c
parenta3ade9fd0cea1bb4a6d0c00cf89ffc546093683a (diff)
downloadatril-580e4fa77018dc57cfd88e229fb21b1d87dfd3dd.tar.bz2
atril-580e4fa77018dc57cfd88e229fb21b1d87dfd3dd.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,