mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-10 19:00:08 +00:00
popover: Optimize the transition
There's no need to queue a resize here. https://bugzilla.gnome.org/show_bug.cgi?id=753568
This commit is contained in:
parent
0455e56517
commit
84bd32a09a
@ -518,8 +518,6 @@ show_animate_cb (GtkWidget *widget,
|
||||
gtk_widget_set_opacity (widget, 1.0 - t);
|
||||
}
|
||||
|
||||
gtk_widget_queue_resize (GTK_WIDGET (popover));
|
||||
|
||||
if (t >= 1.0)
|
||||
{
|
||||
if (priv->state == STATE_SHOWING)
|
||||
@ -532,10 +530,10 @@ show_animate_cb (GtkWidget *widget,
|
||||
else
|
||||
gtk_popover_set_state (popover, STATE_HIDDEN);
|
||||
|
||||
return FALSE;
|
||||
return G_SOURCE_REMOVE;
|
||||
}
|
||||
else
|
||||
return TRUE;
|
||||
return G_SOURCE_CONTINUE;
|
||||
}
|
||||
|
||||
static void
|
||||
@ -575,7 +573,7 @@ gtk_popover_set_state (GtkPopover *popover,
|
||||
gtk_popover_start_transition (popover);
|
||||
else
|
||||
{
|
||||
if (priv->tick_id)
|
||||
if (priv->tick_id != 0)
|
||||
{
|
||||
gtk_widget_remove_tick_callback (GTK_WIDGET (popover), priv->tick_id);
|
||||
priv->tick_id = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user