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-23 11:12:32 (GMT)
committer Aleksey Lim <alsroot@member.fsf.org>2009-08-25 15:50:13 (GMT)
commitca5c0088adf4115f1ccc90d2441eee2ca0c102a2 (patch)
treea40ad0a66315d6782c3a94d6ffd592fc1636cfc9 /src
parent3220c6ca140a7535f0994a9bb7d5d7392b885672 (diff)
Do not expand thumbs by defualt
Diffstat (limited to 'src')
-rw-r--r--src/jarabe/journal/thumbsview.py11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/jarabe/journal/thumbsview.py b/src/jarabe/journal/thumbsview.py
index 2fa6fc5..2632240 100644
--- a/src/jarabe/journal/thumbsview.py
+++ b/src/jarabe/journal/thumbsview.py
@@ -81,7 +81,7 @@ class ThumbsCell(TableCell, hippo.CanvasBox):
xalign=hippo.ALIGNMENT_CENTER,
yalign=hippo.ALIGNMENT_CENTER)
self.thumb.connect('detail-clicked', self.__detail_clicked_cb)
- self.activity_box.append(self.thumb, hippo.PACK_EXPAND)
+ self.activity_box.append(self.thumb, hippo.PACK_FIXED)
self.activity_icon = ActivityIcon(
border=style.LINE_WIDTH,
@@ -89,7 +89,7 @@ class ThumbsCell(TableCell, hippo.CanvasBox):
xalign=hippo.ALIGNMENT_CENTER,
yalign=hippo.ALIGNMENT_CENTER)
self.activity_icon.connect('detail-clicked', self.__detail_clicked_cb)
- self.activity_box.append(self.activity_icon, hippo.PACK_EXPAND)
+ self.activity_box.append(self.activity_icon, hippo.PACK_FIXED)
self.title = hippo.CanvasText(
padding_top=style.DEFAULT_PADDING,
@@ -113,6 +113,9 @@ class ThumbsCell(TableCell, hippo.CanvasBox):
w = int(h / 3. * 4.)
else:
h = int(w / 4. * 3.)
+ w -= style.LINE_WIDTH * 2
+ h -= style.LINE_WIDTH * 2
+
thumb = self.row[Source.FIELD_THUMB]
if self._last_uid == self.row[Source.FIELD_UID] and \
@@ -127,6 +130,8 @@ class ThumbsCell(TableCell, hippo.CanvasBox):
self.activity_icon.set_visible(True)
self.activity_icon.set_metadata(self.row.metadata)
self.activity_icon.allocate(w, h, True)
+ self.activity_box.set_position(self.activity_icon,
+ style.LINE_WIDTH, style.LINE_WIDTH)
else:
self.activity_icon.set_visible(False)
self.thumb.set_visible(True)
@@ -135,6 +140,8 @@ class ThumbsCell(TableCell, hippo.CanvasBox):
self.thumb.props.image = thumb
self.thumb.set_metadata(self.row.metadata)
self.thumb.allocate(w, h, True)
+ self.activity_box.set_position(self.thumb,
+ style.LINE_WIDTH, style.LINE_WIDTH)
def __star_activated_cb(self, keep_button):
self.row.metadata['keep'] = not keep_button.props.keep and 1 or 0