[gnome-shell/wip/paging-release: 46/74] Fixed folder view not expading when we change screen resolution from a small resolution to a bigger



commit 20753c0b415c8cb90c2378ff377a006e08e8ccf7
Author: Carlos Soriano <carlos soriano89 gmail com>
Date:   Fri Jul 19 12:42:02 2013 +0200

    Fixed folder view not expading when we change screen resolution from a
    small resolution to a bigger resolution

 js/ui/appDisplay.js |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/js/ui/appDisplay.js b/js/ui/appDisplay.js
index 1aaaa14..d6769af 100644
--- a/js/ui/appDisplay.js
+++ b/js/ui/appDisplay.js
@@ -1102,7 +1102,10 @@ const FolderView = new Lang.Class({
     _init: function() {
         this._grid = new IconGrid.IconGrid({ xAlign: St.Align.MIDDLE,
             columnLimit: MAX_COLUMNS });
-
+        // If it not expand, the parent doesn't take into account its preferred_width when allocating
+        // the second time it allocates
+        this._grid.actor.x_expand = true;
+        
         this.actor = new St.ScrollView({overlay_scrollbars: true});
         this.actor.set_policy(Gtk.PolicyType.NEVER, Gtk.PolicyType.AUTOMATIC);
         this._box = new St.BoxLayout({vertical: true, reactive: true});
@@ -1234,7 +1237,9 @@ const FolderView = new Lang.Class({
     usedWidth: function() {
         let box = this._containerBox();
         let availWidthPerPage = box.x2 - box.x1;
+        global.log("CALCULATING USED WIDTH " + availWidthPerPage);
         let maxUsedWidth = this._grid.usedWidth(availWidthPerPage);
+        global.log("CALCULATED USED WIDTH " + maxUsedWidth);
         return maxUsedWidth;
     },
     
@@ -1446,7 +1451,6 @@ const FolderIcon = new Lang.Class({
              * then calculate the maxUsedHeigth and the current Used height, if it
              * is more, strech to the maxUsedHeight
              */
-            let usedHeight = this._popUpGridHeight();
             this.view.actor.set_height(this._popUpGridHeight());
             
             this._updatePopupPosition();


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