diff --git a/GooCalendar/Calendar.py b/GooCalendar/Calendar.py index aa028eed9bd025144ec73e0f38f84e6dfb895f23_R29vQ2FsZW5kYXIvQ2FsZW5kYXIucHk=..c088bb2eae9eefebe62048502ce447182cdb5461_R29vQ2FsZW5kYXIvQ2FsZW5kYXIucHk= 100644 --- a/GooCalendar/Calendar.py +++ b/GooCalendar/Calendar.py @@ -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): diff --git a/GooCalendar/DayItem.py b/GooCalendar/DayItem.py index aa028eed9bd025144ec73e0f38f84e6dfb895f23_R29vQ2FsZW5kYXIvRGF5SXRlbS5weQ==..c088bb2eae9eefebe62048502ce447182cdb5461_R29vQ2FsZW5kYXIvRGF5SXRlbS5weQ== 100644 --- a/GooCalendar/DayItem.py +++ b/GooCalendar/DayItem.py @@ -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: