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:
@@ -484,20 +484,24 @@ void
|
|||||||
gcal_month_cell_set_overflow (GcalMonthCell *self,
|
gcal_month_cell_set_overflow (GcalMonthCell *self,
|
||||||
guint n_overflow)
|
guint n_overflow)
|
||||||
{
|
{
|
||||||
g_autofree gchar *text = NULL;
|
|
||||||
|
|
||||||
g_return_if_fail (GCAL_IS_MONTH_CELL (self));
|
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)
|
if (self->n_overflow == n_overflow)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
self->n_overflow = n_overflow;
|
self->n_overflow = n_overflow;
|
||||||
|
|
||||||
text = g_strdup_printf ("+%d", n_overflow);
|
gtk_widget_set_sensitive (self->overflow_button, n_overflow > 0);
|
||||||
gtk_inscription_set_text (self->overflow_inscription, text);
|
|
||||||
|
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
|
gint
|
||||||
|
|||||||
Reference in New Issue
Block a user