From d5304b64bb19300df181703917d3c06c7c194b33 Mon Sep 17 00:00:00 2001 From: Marco Pesenti Gritti Date: Thu, 24 Feb 2005 13:13:23 +0000 Subject: [PATCH] Calculate offsets before calling the parent class (which does a redraw) 2005-02-24 Marco Pesenti Gritti * shell/ev-view.c: (ev_view_size_allocate): Calculate offsets before calling the parent class (which does a redraw) --- ChangeLog | 7 +++++++ shell/ev-view.c | 10 +++++----- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2557032d..b6680803 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2005-02-24 Marco Pesenti Gritti + + * shell/ev-view.c: (ev_view_size_allocate): + + Calculate offsets before calling the parent + class (which does a redraw) + 2005-02-24 Marco Pesenti Gritti * pdf/xpdf/pdf-document.cc: diff --git a/shell/ev-view.c b/shell/ev-view.c index c667bf9d..610c880c 100644 --- a/shell/ev-view.c +++ b/shell/ev-view.c @@ -280,11 +280,6 @@ ev_view_size_allocate (GtkWidget *widget, GtkBorder border; gint width, height; - GTK_WIDGET_CLASS (ev_view_parent_class)->size_allocate (widget, allocation); - - view_set_adjustment_values (view, GTK_ORIENTATION_HORIZONTAL); - view_set_adjustment_values (view, GTK_ORIENTATION_VERTICAL); - if (view->document) { ev_document_get_page_size (view->document, -1, &width, &height); @@ -297,6 +292,11 @@ ev_view_size_allocate (GtkWidget *widget, view->y_offset += MAX (0, (widget->allocation.height - target_height) / 2); } + GTK_WIDGET_CLASS (ev_view_parent_class)->size_allocate (widget, allocation); + + view_set_adjustment_values (view, GTK_ORIENTATION_HORIZONTAL); + view_set_adjustment_values (view, GTK_ORIENTATION_VERTICAL); + if (GTK_WIDGET_REALIZED (widget)) { gdk_window_resize (view->bin_window, MAX (widget->allocation.width, widget->requisition.width), -- 2.43.5