From eca63dcdbc425e44e353e93e8760a69e9b1f2d83 Mon Sep 17 00:00:00 2001 From: WizardOhio24 Date: Sat, 26 Jan 2019 12:34:38 +0000 Subject: Added Feature: Recenter page in window, Ctrl+4 shortcut --- src/desktop.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/desktop.cpp') diff --git a/src/desktop.cpp b/src/desktop.cpp index ff40e5934..40305cba1 100644 --- a/src/desktop.cpp +++ b/src/desktop.cpp @@ -1064,6 +1064,14 @@ SPDesktop::zoom_selection() set_display_area(*d, 10); } +/** + * Centre Page in window, without zooming + */ +void SPDesktop::zoom_center_page() +{ + zoom_absolute_center_point(Geom::Point(doc()->getWidth().value("px")/2, doc()->getHeight().value("px")/2), this->current_zoom()); +} + /** * Performs a quick zoom into what the user is working on. -- cgit v1.2.3