[gnome-shell/wip/paging] Fixed folder view not expading when we change screen resolution from a small resolution to a bigger
- From: Carlos Soriano <csoriano src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/wip/paging] Fixed folder view not expading when we change screen resolution from a small resolution to a bigger
- Date: Fri, 19 Jul 2013 11:24:01 +0000 (UTC)
commit d1182a55612f66192e8753295efc450b7d068229
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 65cfe11..acfd128 100644
--- a/js/ui/appDisplay.js
+++ b/js/ui/appDisplay.js
@@ -1113,7 +1113,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});
@@ -1245,7 +1248,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;
},
@@ -1457,7 +1462,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]