[gnome-software] Make details page scroll up



commit 6e3aa554b0229670b05338601d23725df3ebad7a
Author: Matthias Clasen <mclasen redhat com>
Date:   Fri Oct 11 22:56:28 2013 -0400

    Make details page scroll up
    
    Now that details can become long, it is important that we
    scroll up when we get back to the details page. We always
    want to show the top of the page, initially.

 src/gs-shell-details.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/src/gs-shell-details.c b/src/gs-shell-details.c
index eedacc8..a1f0fd3 100644
--- a/src/gs-shell-details.c
+++ b/src/gs-shell-details.c
@@ -71,6 +71,7 @@ gs_shell_details_refresh (GsShellDetails *shell_details)
        GsAppKind kind;
        GsAppState state;
        GtkWidget *widget;
+       GtkAdjustment *adj;
 
        if (gs_shell_get_mode (priv->shell) != GS_SHELL_MODE_DETAILS)
                return;
@@ -174,6 +175,9 @@ gs_shell_details_refresh (GsShellDetails *shell_details)
        }
 
        widget = GTK_WIDGET (gtk_builder_get_object (priv->builder, "scrolledwindow_details"));
+       adj = gtk_scrolled_window_get_vadjustment (GTK_SCROLLED_WINDOW (widget));
+       gtk_adjustment_set_value (adj, gtk_adjustment_get_lower (adj));
+
        gs_grab_focus_when_mapped (widget);
 }
 


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