views/month: Show first invisible rows above and below

But mark them as not child visible. This should make keyboard
navigation work again, as the focused rows don't change actual
visible state, and thus are keyboard navigatable and don't lose
focus.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/769>
This commit is contained in:
Georges Basile Stavracas Neto
2026-05-20 18:26:37 +00:00
committed by Marge Bot
parent c9c455b6d8
commit 59ee1db556
+10 -2
View File
@@ -419,9 +419,17 @@ update_visible_rows (GcalMonthView *self)
for (unsigned int i = 0; i < self->week_rows->len; i++)
{
GtkWidget *row = g_ptr_array_index (self->week_rows, i);
GtkWidget *row;
gboolean child_visible;
gboolean visible;
gtk_widget_set_visible (row, i >= actual_first_visible_row && i <= actual_last_visible_row);
row = g_ptr_array_index (self->week_rows, i);
child_visible = i >= actual_first_visible_row && i <= actual_last_visible_row;
visible = (i >= actual_first_visible_row - 1) && (i <= actual_last_visible_row + 1);
gtk_widget_set_visible (row, visible);
gtk_widget_set_child_visible (row, child_visible);
}
}