[gnome-shell/app-picker-refresh: 8/16] appDisplay: Only make primary app view scrollable



commit f3cbe590b731fcc466dbbd63d8afbbe2362cc146
Author: Florian Müllner <fmuellner gnome org>
Date:   Fri Feb 15 16:54:09 2013 +0100

    appDisplay: Only make primary app view scrollable

 js/ui/appDisplay.js |   12 +++++++++---
 1 files changed, 9 insertions(+), 3 deletions(-)
---
diff --git a/js/ui/appDisplay.js b/js/ui/appDisplay.js
index 369fa48..8d4484b 100644
--- a/js/ui/appDisplay.js
+++ b/js/ui/appDisplay.js
@@ -50,7 +50,9 @@ function _loadCategory(dir, view) {
 const AlphabeticalView = new Lang.Class({
     Name: 'AlphabeticalView',
 
-    _init: function() {
+    _init: function(params) {
+        params = Params.parse(params, { scrollable: false });
+
         this._grid = new IconGrid.IconGrid({ xAlign: St.Align.START });
         this._appSystem = Shell.AppSystem.get_default();
 
@@ -63,9 +65,13 @@ const AlphabeticalView = new Lang.Class({
         this.actor = new St.ScrollView({ x_fill: true,
                                          y_fill: false,
                                          y_align: St.Align.START,
+                                         reactive: params.scrollable,
                                          style_class: 'vfade' });
         this.actor.add_actor(box);
-        this.actor.set_policy(Gtk.PolicyType.NEVER, Gtk.PolicyType.AUTOMATIC);
+        let vPolicy = params.scrollable ? Gtk.PolicyType.AUTOMATIC
+                                        : Gtk.PolicyType.NEVER;
+        this.actor.set_policy(Gtk.PolicyType.NEVER, vPolicy);
+
         let action = new Clutter.PanAction({ interpolate: true });
         action.connect('pan', Lang.bind(this, this._onPan));
         this.actor.add_action(action);
@@ -144,7 +150,7 @@ const AppDisplay = new Lang.Class({
                                   style_class: 'app-display',
                                   x_fill: true, y_fill: true });
 
-        this._view = new AlphabeticalView();
+        this._view = new AlphabeticalView({ scrollable: true });
         box.add(this._view.actor);
 
         // We need a dummy actor to catch the keyboard focus if the


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