From 3e884b7af0f91fc44c6343857266f35116a0a1b6 Mon Sep 17 00:00:00 2001 From: "Owen W. Taylor" Date: Sun, 16 Dec 2007 08:43:47 -0500 Subject: [PATCH] Don't force position to zero on calculate() In the hack to force a size_allocate() after calculate so scroll_to_mark works, allocate at current size, not at the full requisition size. The latter was causing upper = text_height/requisition - page_size/allocation = 0 http://www.reinteract.org/trac/ticket/8 --- lib/reinteract/main.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/reinteract/main.py b/lib/reinteract/main.py index d7ff5f8..2c07e30 100644 --- a/lib/reinteract/main.py +++ b/lib/reinteract/main.py @@ -216,8 +216,9 @@ def calculate(): # This is a hack to work around the fact that scroll_mark_onscreen() # doesn't wait for a size-allocate cycle, so doesn't properly handle # embedded request widgets - w, h = view.size_request() - view.size_allocate((view.allocation.x, view.allocation.y, w, h)) + view.size_request() + view.size_allocate((view.allocation.x, view.allocation.y, + view.allocation.width, view.allocation.height)) view.scroll_mark_onscreen(buf.get_insert()) -- 2.11.4.GIT