From 146c4d65582c7df5e122bf2a3b8d60cd212c90db Mon Sep 17 00:00:00 2001 From: Marco Pesenti Gritti Date: Thu, 20 Jan 2005 18:05:47 +0000 Subject: [PATCH] forgot this --- shell/ev-view.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/shell/ev-view.c b/shell/ev-view.c index e76f5b81..cd3d666a 100644 --- a/shell/ev-view.c +++ b/shell/ev-view.c @@ -395,13 +395,19 @@ expose_bin_window (GtkWidget *widget, GdkEventExpose *event) { EvView *view = EV_VIEW (widget); - int i; - int current_page; + int i, current_page; + int x_offset, y_offset; const EvFindResult *results; if (view->document == NULL) return; - + + x_offset = MAX (0, (widget->allocation.width - + widget->requisition.width) / 2); + y_offset = MAX (0, (widget->allocation.height - + widget->requisition.height) / 2); + ev_document_set_page_offset (view->document, x_offset, y_offset); + ev_document_render (view->document, event->area.x, event->area.y, event->area.width, event->area.height); -- 2.43.5