From 6d47fc1db82cab62bf942cd0e5328f376585aa9b Mon Sep 17 00:00:00 2001 From: Hari Rana Date: Mon, 22 Dec 2025 13:33:54 -0500 Subject: [PATCH] views/month-view-row: Add offset when allocating event widgets The SEPARATOR_OFFSET constant is for the box shadow property defined in month cells' CSS. Since the box-shadow property does not contribute to layout, so these offsets need to be set manually. Part-of: --- src/gui/views/gcal-month-view-row.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/gui/views/gcal-month-view-row.c b/src/gui/views/gcal-month-view-row.c index b8c2f8db..d750c5ff 100644 --- a/src/gui/views/gcal-month-view-row.c +++ b/src/gui/views/gcal-month-view-row.c @@ -30,6 +30,8 @@ #include "gcal-range-tree.h" #include "gcal-utils.h" +#define SEPARATOR_OFFSET -1 + typedef struct { GtkWidget *event_widget; @@ -582,9 +584,9 @@ gcal_month_view_row_size_allocate (GtkWidget *widget, start_cell = is_ltr ? block->cell : 7 - block->cell - block->length; end_cell = start_cell + block->length; - allocation.x = round (start_cell * cell_width); + allocation.x = round (start_cell * cell_width - (is_ltr ? 0 : SEPARATOR_OFFSET)); allocation.y = cell_y[block->cell]; - allocation.width = round (end_cell * cell_width); + allocation.width = round (end_cell * cell_width) - allocation.x + (is_ltr ? SEPARATOR_OFFSET : 0); allocation.height = block->height; gtk_widget_set_child_visible (block->event_widget, block->visible);