From: Fredrik Tolf Date: Fri, 19 Jul 2013 07:13:06 +0000 (+0200) Subject: Fixed pan bug when reallocating pageview. X-Git-Url: http://dolda2000.com/gitweb/?p=automanga.git;a=commitdiff_plain;h=5e98c1aa8cfadcb81cd9ebb61a1e6352c6e16e80 Fixed pan bug when reallocating pageview. --- diff --git a/manga/reader.py b/manga/reader.py index b753042..075d846 100644 --- a/manga/reader.py +++ b/manga/reader.py @@ -213,6 +213,15 @@ class pageview(gtk.Widget): self.allocation = alloc if self.fit: self.zoom = self.fitzoom() + else: + aw, ah = self.get_asize() + zw, zh = self.get_zsize() + ox, oy = self.off + if zw >= aw and ox + aw > zw: + ox = zw - aw + if zh >= ah and oy + ah > zh: + oy = zh - ah + self.off = ox, oy if self.flags() & gtk.REALIZED: self.window.move_resize(*alloc)