[gtk/wip/carlosg/fix-search-entry: 4/4] revealer: Set child visible early during animation
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/carlosg/fix-search-entry: 4/4] revealer: Set child visible early during animation
- Date: Mon, 18 Feb 2019 20:51:42 +0000 (UTC)
commit 9259491e0aa5385b8dd5a62c77b279560f20451a
Author: Carlos Garnacho <carlosg gnome org>
Date: Mon Feb 18 21:42:46 2019 +0100
revealer: Set child visible early during animation
Set the child visible early, in order to allow forwarding events for the
whole span of the show animation.
gtk/gtkrevealer.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
---
diff --git a/gtk/gtkrevealer.c b/gtk/gtkrevealer.c
index 3f521baa4c..82b3876193 100644
--- a/gtk/gtkrevealer.c
+++ b/gtk/gtkrevealer.c
@@ -387,7 +387,7 @@ gtk_revealer_set_position (GtkRevealer *revealer,
priv->current_pos = pos;
- new_visible = priv->current_pos != 0.0;
+ new_visible = priv->target_pos != 0.0 || priv->current_pos != 0.0;
child = gtk_bin_get_child (GTK_BIN (revealer));
if (child != NULL &&
@@ -468,6 +468,8 @@ gtk_revealer_start_animation (GtkRevealer *revealer,
priv->transition_duration * 1000,
0,
1.0);
+ gtk_widget_set_child_visible (gtk_bin_get_child (GTK_BIN (revealer)),
+ priv->target_pos != 0);
}
else
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]