diff --git a/data/ui/month-cell.ui b/data/ui/month-cell.ui index afdcb972..fef72806 100644 --- a/data/ui/month-cell.ui +++ b/data/ui/month-cell.ui @@ -18,7 +18,7 @@ start 6 6 - 3 + 0 True diff --git a/src/views/gcal-month-cell.c b/src/views/gcal-month-cell.c index 5ce2af21..1d90fa9f 100644 --- a/src/views/gcal-month-cell.c +++ b/src/views/gcal-month-cell.c @@ -590,9 +590,21 @@ gcal_month_cell_get_real_height (GcalMonthCell *self) gint gcal_month_cell_get_header_height (GcalMonthCell *self) { + GtkStyleContext *context; + GtkBorder padding; + GtkBorder border; + g_return_val_if_fail (GCAL_IS_MONTH_CELL (self), -1); - return gtk_widget_get_allocated_height (self->header_box); + context = gtk_widget_get_style_context (GTK_WIDGET (self->header_box)); + gtk_style_context_get_padding (context, gtk_style_context_get_state (context), &padding); + gtk_style_context_get_border (context, gtk_style_context_get_state (context), &border); + + return gtk_widget_get_allocated_height (self->header_box) + + gtk_widget_get_margin_top (self->header_box) + + gtk_widget_get_margin_bottom (self->header_box) + + padding.top + padding.bottom + + border.top + border.bottom; } gboolean