[gnome-shell] app-display: Expose BaseIcon params in AppWellIcon



commit 38fb51a99ef62a8893a15189fd69a4c3ee6d9be2
Author: Florian Müllner <fmuellner gnome org>
Date:   Thu Jan 13 16:02:55 2011 +0100

    app-display: Expose BaseIcon params in AppWellIcon
    
    AppWellIcon is used both in the dash and view selector. As the dash
    requires manual sizing, it is not possible to set the icon size used
    in the view selector in the CSS, but icons will use the default size
    (unless set manually as in the dash).
    
    Expose the params parameter of BaseIcon and enable manual resizing
    only for AppWellIcons in the dash.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=639428

 js/ui/appDisplay.js |   16 ++++++++--------
 js/ui/dash.js       |    3 ++-
 2 files changed, 10 insertions(+), 9 deletions(-)
---
diff --git a/js/ui/appDisplay.js b/js/ui/appDisplay.js
index 95530d9..4b460fc 100644
--- a/js/ui/appDisplay.js
+++ b/js/ui/appDisplay.js
@@ -281,21 +281,21 @@ PrefsSearchProvider.prototype = {
     }
 };
 
-function AppIcon(app) {
-    this._init(app);
+function AppIcon(app, params) {
+    this._init(app, params);
 }
 
 AppIcon.prototype = {
     __proto__:  IconGrid.BaseIcon.prototype,
 
-    _init : function(app) {
+    _init : function(app, params) {
         this.app = app;
 
         let label = this.app.get_name();
 
         IconGrid.BaseIcon.prototype._init.call(this,
                                                label,
-                                               { setSizeManually: true });
+                                               params);
     },
 
     createIcon: function(iconSize) {
@@ -303,12 +303,12 @@ AppIcon.prototype = {
     }
 };
 
-function AppWellIcon(app) {
-    this._init(app);
+function AppWellIcon(app, iconParams) {
+    this._init(app, iconParams);
 }
 
 AppWellIcon.prototype = {
-    _init : function(app) {
+    _init : function(app, iconParams) {
         this.app = app;
         this.actor = new St.Clickable({ style_class: 'app-well-app',
                                          reactive: true,
@@ -316,7 +316,7 @@ AppWellIcon.prototype = {
                                          y_fill: true });
         this.actor._delegate = this;
 
-        this.icon = new AppIcon(app);
+        this.icon = new AppIcon(app, iconParams);
         this.actor.set_child(this.icon.actor);
 
         this.actor.connect('clicked', Lang.bind(this, this._onClicked));
diff --git a/js/ui/dash.js b/js/ui/dash.js
index e3f3063..99f9161 100644
--- a/js/ui/dash.js
+++ b/js/ui/dash.js
@@ -193,7 +193,8 @@ Dash.prototype = {
     },
 
     _addApp: function(app) {
-        let display = new AppDisplay.AppWellIcon(app);
+        let display = new AppDisplay.AppWellIcon(app,
+                                                 { setSizeManually: true });
         display._draggable.connect('drag-begin',
                                    Lang.bind(this, function() {
                                        display.actor.opacity = 50;



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