month-cell: Don't change inscription visibility

Let's just change the text and preserve the visibility of the
inscription.
This commit is contained in:
Georges Basile Stavracas Neto
2023-08-11 15:13:44 -03:00
parent c2b07a5e0a
commit 030f370015
+11 -7
View File
@@ -484,20 +484,24 @@ void
gcal_month_cell_set_overflow (GcalMonthCell *self,
guint n_overflow)
{
g_autofree gchar *text = NULL;
g_return_if_fail (GCAL_IS_MONTH_CELL (self));
gtk_widget_set_child_visible (GTK_WIDGET (self->overflow_inscription), n_overflow > 0);
gtk_widget_set_sensitive (self->overflow_button, n_overflow > 0);
if (self->n_overflow == n_overflow)
return;
self->n_overflow = n_overflow;
text = g_strdup_printf ("+%d", n_overflow);
gtk_inscription_set_text (self->overflow_inscription, text);
gtk_widget_set_sensitive (self->overflow_button, n_overflow > 0);
if (n_overflow > 0)
{
g_autofree gchar *text = g_strdup_printf ("+%d", n_overflow);
gtk_inscription_set_text (self->overflow_inscription, text);
}
else
{
gtk_inscription_set_text (self->overflow_inscription, "");
}
}
gint