[hamster-applet] more accurate variable names, less mess, fixes bug 607354
- From: Toms Baugis <tbaugis src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [hamster-applet] more accurate variable names, less mess, fixes bug 607354
- Date: Mon, 18 Jan 2010 21:16:19 +0000 (UTC)
commit 6d7e6450c3f8ca38d6a79429db57b47939d5675b
Author: Toms Bauģis <toms baugis gmail com>
Date: Mon Jan 18 21:15:10 2010 +0000
more accurate variable names, less mess, fixes bug 607354
hamster/widgets/facttree.py | 14 +++++++-------
1 files changed, 7 insertions(+), 7 deletions(-)
---
diff --git a/hamster/widgets/facttree.py b/hamster/widgets/facttree.py
index 3bf02a9..d7f7244 100644
--- a/hamster/widgets/facttree.py
+++ b/hamster/widgets/facttree.py
@@ -422,8 +422,9 @@ class FactCellRenderer(gtk.GenericCellRenderer):
tag_cell_start = cell_start + widget.longest_activity_category
tag_cell_end = cell_start + cell_width
- cur_x, cur_y = tag_cell_start, 2
+ cell_height = label_h + 2
+ cur_x, cur_y = tag_cell_start, 2
if fact["tags"]:
layout.set_font_description(self.tag_font)
@@ -435,6 +436,8 @@ class FactCellRenderer(gtk.GenericCellRenderer):
cur_y += tag_h + 4
cur_x += tag_w + 4
+ cell_height = max(cell_height, cur_y + tag_h + 3)
+
labels["tags"] = (None, tag_cell_start, 2, tag_cell_end)
layout.set_font_description(self.label_font)
@@ -452,7 +455,7 @@ class FactCellRenderer(gtk.GenericCellRenderer):
if x + label_w > width:
x = cell_start
- y = max(duration_h, y + tag_h) + 4
+ y = cell_height
width = cell_width
layout.set_width(width * pango.SCALE)
@@ -460,13 +463,10 @@ class FactCellRenderer(gtk.GenericCellRenderer):
labels["description"] = (description, x, y, width * pango.SCALE)
- cur_y = y + label_h + 4
- else:
- cur_y += label_h + 4
-
+ cell_height += label_h + 2
self.labels[fact["id"]] = labels
- return (0, 0, 0, cur_y)
+ return (0, 0, 0, cell_height)
def on_get_size (self, widget, cell_area):
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]