diff options
-rw-r--r-- | platform/x11/pdfapp.c | 6 | ||||
-rw-r--r-- | platform/x11/pdfapp.h | 1 | ||||
-rw-r--r-- | platform/x11/x11_main.c | 1 |
3 files changed, 8 insertions, 0 deletions
diff --git a/platform/x11/pdfapp.c b/platform/x11/pdfapp.c index 0291c8d7..bc044062 100644 --- a/platform/x11/pdfapp.c +++ b/platform/x11/pdfapp.c @@ -95,6 +95,7 @@ char *pdfapp_usage(pdfapp_t *app) "W\t\t-- zoom to fit window width\n" "H\t\t-- zoom to fit window height\n" "Z\t\t-- zoom to fit page\n" + "z\t\t-- reset zoom\n" "[\t\t-- decrease font size (EPUB only)\n" "]\t\t-- increase font size (EPUB only)\n" "w\t\t-- shrinkwrap\n" @@ -148,6 +149,7 @@ void pdfapp_init(fz_context *ctx, pdfapp_t *app) void pdfapp_setresolution(pdfapp_t *app, int res) { + app->default_resolution = res; app->resolution = res; } @@ -1248,6 +1250,10 @@ void pdfapp_onkey(pdfapp_t *app, int c, int modifiers) case 'Z': pdfapp_autozoom(app); break; + case 'z': + app->resolution = app->default_resolution; + pdfapp_showpage(app, 0, 1, 1, 0, 0); + break; case 'L': app->rotate -= 90; diff --git a/platform/x11/pdfapp.h b/platform/x11/pdfapp.h index a367f935..24c89f0f 100644 --- a/platform/x11/pdfapp.h +++ b/platform/x11/pdfapp.h @@ -70,6 +70,7 @@ struct pdfapp_s int pagecount; /* current view params */ + float default_resolution; float resolution; int rotate; fz_pixmap *image; diff --git a/platform/x11/x11_main.c b/platform/x11/x11_main.c index 2f4b39b0..ddfdee2b 100644 --- a/platform/x11/x11_main.c +++ b/platform/x11/x11_main.c @@ -931,6 +931,7 @@ int main(int argc, char **argv) gapp.transitions_enabled = 1; gapp.scrw = DisplayWidth(xdpy, xscr); gapp.scrh = DisplayHeight(xdpy, xscr); + gapp.default_resolution = resolution; gapp.resolution = resolution; gapp.pageno = pageno; |