File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -611,7 +611,9 @@ def create_single_week( # noqa: PLR0912, PLR0915
611611 svg .Text (
612612 text = day ,
613613 x = base_x + (row_width * cell_width ) / 2 ,
614- y = base_y + DAY_TEXT_HEIGHT ,
614+ y = base_y
615+ + DAY_TEXT_HEIGHT
616+ - (cell_height / 20 if num_rows == 3 else 0 ), # noqa: PLR2004
615617 font_size = DAY_TEXT_SIZE ,
616618 text_anchor = "middle" ,
617619 class_ = ["title" ],
@@ -621,12 +623,16 @@ def create_single_week( # noqa: PLR0912, PLR0915
621623
622624 for col in range (col_width ):
623625 for row in range (row_width ):
624- event_scale = 0.7 if num_rows == 3 else 1.0 # noqa: PLR2004
626+ event_scale = 0.85 if num_rows == 3 else 1.0 # noqa: PLR2004
625627
626628 # work out extra translation required
627629 translate_x = base_x + row * cell_width + cell_width / 2
628630 translate_y = base_y + col * cell_height + cell_height / 2 + DAY_TEXT_HEIGHT / 2
629631
632+ # when 3 rows, events are too low
633+ if num_rows == 3 : # noqa: PLR2004
634+ translate_y -= cell_height / 20
635+
630636 # if spanning multiple columns, pull towards centre
631637 pull_y = 0 if col_width == 1 else pull_factor
632638 translate_y = (1 - pull_y ) * translate_y + pull_y * centre_y
You can’t perform that action at this time.
0 commit comments