diff --git a/src/hamster/widgets/facttree.py b/src/hamster/widgets/facttree.py index 0304a8590..ee98ca71b 100644 --- a/src/hamster/widgets/facttree.py +++ b/src/hamster/widgets/facttree.py @@ -76,7 +76,7 @@ def __init__(self, x=0, y=0, color=None): self._label_context = cairo.Context(cairo.ImageSurface(cairo.FORMAT_A1, 0, 0)) self.layout = pangocairo.create_layout(self._label_context) self.layout.set_font_description(pango.FontDescription(graphics._font_desc)) - self.set_text("Hamster") # dummy + self.set_text("00:00 - 00:00") # dummy time_label for finding width @property def height(self): @@ -128,7 +128,8 @@ def set_text(self, text): class FactRow(object): def __init__(self): self.time_label = Label() - self.activity_label = Label(x=100) + x = self.time_label.layout.get_pixel_size()[0] + 10 + self.activity_label = Label(x=x) self.category_label = Label() self.description_label = Label()