[gnome-software] trivial: Do not animate the categories expander when switching pages



commit f3db9b0a9b7ef7bba9a864cfc6c53b20ee7f41ee
Author: Richard Hughes <richard hughsie com>
Date:   Wed Jun 1 17:29:55 2016 +0100

    trivial: Do not animate the categories expander when switching pages

 src/gs-shell-overview.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/src/gs-shell-overview.c b/src/gs-shell-overview.c
index f1f2369..d55a847 100644
--- a/src/gs-shell-overview.c
+++ b/src/gs-shell-overview.c
@@ -503,6 +503,8 @@ gs_shell_overview_switch_to (GsPage *page, gboolean scroll_up)
        gtk_entry_set_text (GTK_ENTRY (widget), "");
 
        /* hide the expander */
+       gtk_revealer_set_transition_duration (GTK_REVEALER (priv->categories_expander), 0);
+       gtk_revealer_set_transition_duration (GTK_REVEALER (priv->categories_more), 0);
        gtk_revealer_set_reveal_child (GTK_REVEALER (priv->categories_expander), TRUE);
        gtk_revealer_set_reveal_child (GTK_REVEALER (priv->categories_more), FALSE);
 
@@ -540,6 +542,8 @@ static void
 gs_shell_overview_categories_expander_cb (GtkButton *button, GsShellOverview *self)
 {
        GsShellOverviewPrivate *priv = gs_shell_overview_get_instance_private (self);
+       gtk_revealer_set_transition_duration (GTK_REVEALER (priv->categories_expander), 250);
+       gtk_revealer_set_transition_duration (GTK_REVEALER (priv->categories_more), 250);
        gtk_revealer_set_reveal_child (GTK_REVEALER (priv->categories_expander), FALSE);
        gtk_revealer_set_reveal_child (GTK_REVEALER (priv->categories_more), TRUE);
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]