[gtk/wip/carlosg/fix-search-entry: 42/43] 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: 42/43] revealer: Set child visible early during animation
- Date: Tue, 19 Feb 2019 13:06:50 +0000 (UTC)
commit 48e65eae7138d5abe818eae1b3f40ecb4be60a4d
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]