[gnome-shell] [appSwitcher] Remove unneeded workaround
- From: Adel Gadllah <agadllah src gnome org>
 
- To: commits-list gnome org
 
- Cc: 
 
- Subject: [gnome-shell] [appSwitcher] Remove unneeded workaround
 
- Date: Mon, 24 May 2010 14:53:18 +0000 (UTC)
 
commit a1bfaac5a21010843a4d7e4206b2fed92b2f6e59
Author: Adel Gadllah <adel gadllah gmail com>
Date:   Mon May 24 16:52:38 2010 +0200
    [appSwitcher] Remove unneeded workaround
    
    SwitcherList.actor is no longer a St.BoxLayout but a
    GenericContainer now, so the hack in AppSwitcher._getPreferredHeight is no
    longer needed (it is called with the correct width now).
    
    https://bugzilla.gnome.org/show_bug.cgi?id=613194
 js/ui/altTab.js |   10 +++-------
 1 files changed, 3 insertions(+), 7 deletions(-)
---
diff --git a/js/ui/altTab.js b/js/ui/altTab.js
index 1a0e80a..b8dc376 100644
--- a/js/ui/altTab.js
+++ b/js/ui/altTab.js
@@ -841,6 +841,8 @@ AppSwitcher.prototype = {
 
     _getPreferredHeight: function (actor, forWidth, alloc) {
         let j = 0;
+        let height = 0;
+
         while(this._items.length > 1 && this._items[j].style_class != 'item-box') {
                 j++;
         }
@@ -851,17 +853,11 @@ AppSwitcher.prototype = {
         if (this._separator)
            totalSpacing += this._separator.width + this._list.spacing;
 
-        // We just assume the whole screen here due to weirdness happing with the passed width
-        let focus = global.get_focus_monitor();
-        let parentPadding = this.actor.get_parent().get_theme_node().get_horizontal_padding();
-        let availWidth = focus.width - parentPadding - this.actor.get_theme_node().get_horizontal_padding();
-        let height = 0;
-
         for(let i =  0; i < iconSizes.length; i++) {
                 this._iconSize = iconSizes[i];
                 height = iconSizes[i] + iconSpacing;
                 let w = height * this._items.length + totalSpacing;
-                if (w <= availWidth)
+                if (w <= forWidth)
                         break;
         }
 
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]