app-view: Reset scroll position on switch

When switching to the application view, the view is still scrolled
to the position it had when left previously. Given that it is rather
unlikely that the application the user wants to select is located close
to that position, it appears beneficial to start at a predictable
position, so make sure that the scroll position is always reset to
the top.

https://bugzilla.gnome.org/show_bug.cgi?id=641987
This commit is contained in:
Florian Müllner 2011-01-21 23:01:07 +01:00
parent a4e53953a9
commit af3883905b

View File

@ -51,6 +51,9 @@ AlphabeticalView.prototype = {
let adjustment = this.actor.vscroll.adjustment;
let direction = Overview.SwipeScrollDirection.VERTICAL;
Main.overview.setScrollAdjustment(adjustment, direction);
// Reset scroll on mapping
adjustment.value = 0;
}));
},