[gnome-shell/overview-relayout: 13/22] app-display: Slight cleanup and style update



commit e1f336374b0bc1c352f766d307c296476888b2e6
Author: Florian Müllner <fmuellner gnome org>
Date:   Thu Sep 30 17:43:07 2010 +0200

    app-display: Slight cleanup and style update
    
    Being no longer an independent menu pane, both the toggle() and
    close() functions are no longer needed, and the view's structure
    can be simplified a bit.
    
    Also update the style to fit into the view selector.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=634948

 data/theme/gnome-shell.css |   15 +------------
 js/ui/appDisplay.js        |   51 +++++--------------------------------------
 2 files changed, 7 insertions(+), 59 deletions(-)
---
diff --git a/data/theme/gnome-shell.css b/data/theme/gnome-shell.css
index f54ed52..370587c 100644
--- a/data/theme/gnome-shell.css
+++ b/data/theme/gnome-shell.css
@@ -535,10 +535,7 @@ StTooltip StLabel {
 }
 
 .all-app {
-    border-radius: 10px;
-    background-color: #111111;
-    border: 2px solid #868686;
-    color: #ffffff;
+    padding: 10px;
 }
 
 .app-section-divider-container {
@@ -551,16 +548,6 @@ StTooltip StLabel {
     background-image: url("separator-white.png");
 }
 
-.all-app-controls-panel {
-    height: 30px;
-}
-
-.all-app-scroll-view {
-    padding-right: 10px;
-    padding-left: 10px;
-    padding-bottom: 10px;
-}
-
 #dash > .app-well-app {
     padding: 6px 12px;
 }
diff --git a/js/ui/appDisplay.js b/js/ui/appDisplay.js
index b9a3399..632f89c 100644
--- a/js/ui/appDisplay.js
+++ b/js/ui/appDisplay.js
@@ -148,22 +148,14 @@ AllAppDisplay.prototype = {
             Main.queueDeferredWork(this._workId);
         }));
 
-        let bin = new St.BoxLayout({ style_class: 'all-app-controls-panel',
-                                     reactive: true });
-        this.actor = new St.BoxLayout({ style_class: 'all-app', vertical: true });
-        this.actor.hide();
-
-        let view = new St.ScrollView({ x_fill: true,
-                                       y_fill: false,
-                                       style_class: 'all-app-scroll-view',
-                                       vshadows: true });
-        this._scrollView = view;
-        this.actor.add(bin);
-        this.actor.add(view, { expand: true, y_fill: false, y_align: St.Align.START });
+        this._scrollView = new St.ScrollView({ x_fill: true,
+                                               y_fill: false,
+                                               vshadows: true });
+        this.actor = new St.Bin({ style_class: 'all-app',
+                                  y_align: St.Align.START,
+                                  child: this._scrollView });
 
         this._appView = new ViewByCategories();
-        this._appView.connect('launching', Lang.bind(this, this.close));
-        this._appView.connect('drag-begin', Lang.bind(this, this.close));
         this._scrollView.add_actor(this._appView.actor);
 
         this._scrollView.set_policy(Gtk.PolicyType.NEVER, Gtk.PolicyType.AUTOMATIC);
@@ -177,37 +169,6 @@ AllAppDisplay.prototype = {
         });
 
         this._appView.refresh(apps);
-    },
-
-    toggle: function() {
-        if (this.actor.visible) {
-            Tweener.addTween(this.actor,
-                             { opacity: 0,
-                               time: Overview.PANE_FADE_TIME,
-                               transition: 'easeOutQuad',
-                               onComplete: Lang.bind(this,
-                                   function() {
-                                       this.actor.hide();
-                                       this.emit('open-state-changed',
-                                                 this.actor.visible);
-                                   })
-                             });
-        } else {
-            this.actor.show();
-            this.emit('open-state-changed', this.actor.visible);
-            this.actor.opacity = 0;
-            Tweener.addTween(this.actor,
-                             { opacity: 255,
-                               time: Overview.PANE_FADE_TIME,
-                               transition: 'easeOutQuad'
-                             });
-        }
-    },
-
-    close: function() {
-        if (!this.actor.visible)
-            return;
-        this.toggle();
     }
 };
 



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