views/month: Hide invisible rows

Change the child-visible property of rows when allocating. It's safe
to do in allocation because it doesn't affect layout, just rendering.

Related:
https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/402

Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/659>
This commit is contained in:
Georges Basile Stavracas Neto
2025-11-08 21:18:55 -03:00
parent dbe0fef2ba
commit 084a495f5c
+4
View File
@@ -1445,6 +1445,7 @@ gcal_month_view_size_allocate (GtkWidget *widget,
{
GtkAllocation row_allocation;
GtkWidget *row;
gboolean child_visible;
row = g_ptr_array_index (self->week_rows, i);
@@ -1457,6 +1458,9 @@ gcal_month_view_size_allocate (GtkWidget *widget,
#undef ROW_Y
child_visible = (row_allocation.y + row_allocation.height > header_height) && row_allocation.y < height;
gtk_widget_set_child_visible (row, child_visible);
gtk_widget_size_allocate (row, &row_allocation, baseline);
}