[gnome-shell/wip/paging-release: 15/85] appDisplay: really fix spacing



commit 873b2516cdd8f8fc9d99e109a626cd450f7edaf5
Author: Carlos Soriano <carlos soriano89 gmail com>
Date:   Tue Jul 2 19:02:47 2013 +0200

    appDisplay: really fix spacing

 data/theme/gnome-shell.css |    5 -----
 js/ui/appDisplay.js        |   28 ++++++++++++++++++++++++----
 js/ui/iconGrid.js          |    1 -
 3 files changed, 24 insertions(+), 10 deletions(-)
---
diff --git a/data/theme/gnome-shell.css b/data/theme/gnome-shell.css
index 3ca2321..ea1ca99 100644
--- a/data/theme/gnome-shell.css
+++ b/data/theme/gnome-shell.css
@@ -905,11 +905,6 @@ StScrollBar StButton#vhandle:active {
     padding: 0px 88px;
 }
 
-.all-apps {
-/* horizontal padding to make sure scrollbars or dash don't overlap content */
-    padding: 0px 88px;
-}
-
 .pages-indicator {
        spacing: 30px;
 }
diff --git a/js/ui/appDisplay.js b/js/ui/appDisplay.js
index 9a774ba..248dae5 100644
--- a/js/ui/appDisplay.js
+++ b/js/ui/appDisplay.js
@@ -303,12 +303,28 @@ const PaginationScrollView = new Lang.Class({
         this._eventBlocker.add_action(this._clickAction);
     },
     
-    vfunc_get_preferred_height: function (container, forWidht) {
-        return [0, 0];
+   /* vfunc_get_preferred_height: function (forWidht) {
+        global.log(this.get_parent().allocation.y2 - this.get_parent().allocation.y1);
+        
+        let parentBox = this.get_parent().allocation;
+        let gridBox = this.get_theme_node().get_content_box(parentBox);
+        global.log("padding " + this.get_theme_node().get_length('padding'));
+        let availWidth = gridBox.x2 - gridBox.x1;
+        let availHeight = gridBox.y2 - gridBox.y1;
+        global.log("availWidth " + availWidth);
+        
+        global.log("availHeight " + availHeight);
+        
+        return [availHeight, availHeight];
     },
 
-    vfunc_get_preferred_width: function(container, forHeight) {
-        return [0, 0];
+    /*vfunc_get_preferred_width: function(forHeight) {
+        let parentBox = this.get_parent().allocation;
+        let gridBox = this.get_theme_node().get_content_box(parentBox);
+        global.log("padding " + this.get_theme_node().get_length('padding'));
+        let availWidth = gridBox.x2 - gridBox.x1;
+        let availHeight = gridBox.y2 - gridBox.y1;
+        return [availWidth, availWidth];
     },
     /*
     vfunc_allocate: function(box, flags) {
@@ -495,6 +511,10 @@ const IndicatorLayout = Lang.Class({
     Name:'IndicatorLayout',
     Extends: Clutter.BoxLayout,
 
+    vfunc_get_preferred_height: function(container, forHeight) {
+        return [300, 300];
+    },
+    
     vfunc_get_preferred_width: function(container, forHeight) {
         let [minWidth, natWidth] = container.get_children()[0].get_preferred_width(forHeight);
         let totalWidth = natWidth + this.spacing * 2;
diff --git a/js/ui/iconGrid.js b/js/ui/iconGrid.js
index 43134b4..3ffa93d 100644
--- a/js/ui/iconGrid.js
+++ b/js/ui/iconGrid.js
@@ -287,7 +287,6 @@ const IconGrid = new Lang.Class({
         let availWidth = box.x2 - box.x1;
         let availHeight = box.y2 - box.y1;
         let [nColumns, usedWidth, spacing] = this._computeLayout(availWidth);
-
         if(this._usePagination && spacing != this._computedSpacing) {
             this._computedSpacing = spacing;
             // ScrollView height


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