[gnome-shell] appDisplay: Remove scroll view hack in FrequentView



commit 7425b382d6c392437d0f6c0aa16360d216bec7df
Author: Florian Müllner <fmuellner gnome org>
Date:   Fri Feb 22 04:29:57 2013 +0100

    appDisplay: Remove scroll view hack in FrequentView
    
    The frequent view should not be scrolled, but to work around the
    icon grid overflowing, we used a (non-scrolling) scroll view anyway.
    Now that IconGrid:fillParent allows us to avoid overflow, we can
    remove this hack.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=694256

 data/theme/gnome-shell.css |    5 -----
 js/ui/appDisplay.js        |   20 ++++----------------
 2 files changed, 4 insertions(+), 21 deletions(-)
---
diff --git a/data/theme/gnome-shell.css b/data/theme/gnome-shell.css
index 2f1a9f7..4e10623 100644
--- a/data/theme/gnome-shell.css
+++ b/data/theme/gnome-shell.css
@@ -860,11 +860,6 @@ StScrollBar StButton#vhandle:active {
     padding: 4px 16px;
 }
 
-StScrollView.frequent-apps StScrollBar {
-    min-width: 0px;
-    width: 0px;
-}
-
 .app-folder-icon {
     padding: 5px;
 }
diff --git a/js/ui/appDisplay.js b/js/ui/appDisplay.js
index 4ee94cf..e34955a 100644
--- a/js/ui/appDisplay.js
+++ b/js/ui/appDisplay.js
@@ -298,23 +298,11 @@ const FrequentView = new Lang.Class({
 
     _init: function() {
         this._grid = new IconGrid.IconGrid({ xAlign: St.Align.MIDDLE,
+                                             fillParent: true,
                                              columnLimit: MAX_COLUMNS });
-        let box = new St.BoxLayout({ vertical: true });
-        box.add(this._grid.actor);
-
-        // HACK: IconGrid currently lacks API to only display items that match
-        // the allocation, so rather than clipping away eventual overflow, we
-        // use an unscrollable ScrollView with hidden scrollbars to nicely
-        // fade out cut off items
-        this.actor = new St.ScrollView({ x_fill: true,
-                                         y_fill: false,
-                                         y_align: St.Align.START,
-                                         x_expand: true,
-                                         y_expand: true,
-                                         reactive: false,
-                                         style_class: 'frequent-apps vfade' });
-        this.actor.add_actor(box);
-        this.actor.set_policy(Gtk.PolicyType.NEVER, Gtk.PolicyType.AUTOMATIC);
+        this.actor = new St.Widget({ style_class: 'frequent-apps',
+                                     x_expand: true, y_expand: true });
+        this.actor.add_actor(this._grid.actor);
 
         this._usage = Shell.AppUsage.get_default();
     },


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