Skip to content
Snippets Groups Projects
Commit c088bb2e authored by Antoine Smolders's avatar Antoine Smolders
Browse files

Correction of number of free lines in a day

parent aa028eed
No related branches found
No related tags found
No related merge requests found
......@@ -335,6 +335,6 @@
y_pos += day_height
width = self.get_size_request()
width, height = self.get_size_request()
new_width = int(7 * day_width)
new_height = int(14 * box.line_height)
......@@ -339,6 +339,7 @@
new_width = int(7 * day_width)
new_height = int(14 * box.line_height)
if (width != new_width and day_width == day_width_min):
if ((width != new_width and day_width == day_width_min)
or new_height != height):
self.set_size_request(new_width, new_height)
def _get_day_item(self, find_date):
......
......@@ -86,7 +86,8 @@
self.box.set_property('stroke_color', self.body_color)
self.box.set_property('fill_color', self.body_color)
self.n_lines = int(box_height / line_height)
line_height_and_margin = line_height + 2 # 2px of margin per line
self.n_lines = int(box_height / line_height_and_margin)
# Show an indicator in the title, if requested.
if not self.show_indic:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment