Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAleksey Lim <alsroot@member.fsf.org>2009-08-21 21:43:21 (GMT)
committer Aleksey Lim <alsroot@member.fsf.org>2009-08-25 15:47:56 (GMT)
commit3cc314a40fcea8c2e5433043fa30f258d91c671b (patch)
tree6a23e27ea7d60568e2d42f88e080de1264ef48dd /src
parent5099a39aef77952446bbcc179013685f8e963b86 (diff)
Include to SmoothTable range partly visible rows
Diffstat (limited to 'src')
-rw-r--r--src/jarabe/journal/browse/smoothtable.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/jarabe/journal/browse/smoothtable.py b/src/jarabe/journal/browse/smoothtable.py
index b63cb31..47777be 100644
--- a/src/jarabe/journal/browse/smoothtable.py
+++ b/src/jarabe/journal/browse/smoothtable.py
@@ -70,7 +70,8 @@ class SmoothTable(gtk.Container):
if self._adj is None or self._cell_height == 0:
return (0, 0)
top = int(self._adj.value / self._cell_height)
- return (top * self.columns, (top + self.rows) * self.columns - 1)
+ bottom = int(math.ceil(self._adj.value + self._adj.page_size))
+ return (top * self.columns, bottom / self._cell_height * self.columns)
frame = property(get_frame)
@@ -266,7 +267,7 @@ class SmoothTable(gtk.Container):
spare_rows = []
visible_rows = []
- page_end = self._adj.value + self._adj.page_size
+ page_end = int(self._adj.value + self._adj.page_size)
if self._last_allocation != self.allocation:
self._last_allocation = self.allocation