From: Marco Pesenti Gritti Date: Thu, 20 Jan 2005 18:05:47 +0000 (+0000) Subject: forgot this X-Git-Tag: EVINCE_0_1_1~28 X-Git-Url: https://www.fi.muni.cz/~kas/git//home/kas/public_html/git/?a=commitdiff_plain;h=146c4d65582c7df5e122bf2a3b8d60cd212c90db;p=evince.git forgot this --- 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);