[gnome-shell] dash: Make padding even on the top/bottom of the dash



commit 7206b61838efc727de4d6cfb8ae8a0a8e240eb54
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Sat Sep 22 14:25:02 2012 -0300

    dash: Make padding even on the top/bottom of the dash
    
    When Florian landed the new dash container to show the all apps button
    always, he got the math wrong -- he forgot to add padding around the
    container, and used the height of the box to calculate a y2 position,
    rather than the y2 position of the box.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=684619

 js/ui/dash.js |   15 +++++++--------
 1 files changed, 7 insertions(+), 8 deletions(-)
---
diff --git a/js/ui/dash.js b/js/ui/dash.js
index 8ebeddc..4367807 100644
--- a/js/ui/dash.js
+++ b/js/ui/dash.js
@@ -324,22 +324,21 @@ const DashActor = new Lang.Class({
     vfunc_allocate: function(box, flags) {
         let contentBox = this.get_theme_node().get_content_box(box);
         let availWidth = contentBox.x2 - contentBox.x1;
-        let availHeight = contentBox.y2 - contentBox.y1;
 
         this.set_allocation(box, flags);
 
         let [appIcons, showAppsButton] = this.get_children();
-        let [minHeight, natHeight] = showAppsButton.get_preferred_height(availWidth);
+        let [showAppsMinHeight, showAppsNatHeight] = showAppsButton.get_preferred_height(availWidth);
 
         let childBox = new Clutter.ActorBox();
-        childBox.x1 = 0;
-        childBox.x2 = availWidth;
-        childBox.y1 = 0;
-        childBox.y2 = availHeight - natHeight;
+        childBox.x1 = contentBox.x1;
+        childBox.y1 = contentBox.y1;
+        childBox.x2 = contentBox.x2;
+        childBox.y2 = contentBox.y2 - showAppsNatHeight;
         appIcons.allocate(childBox, flags);
 
-        childBox.y1 = availHeight - natHeight;
-        childBox.y2 = availHeight;
+        childBox.y1 = contentBox.y2 - showAppsNatHeight;
+        childBox.y2 = contentBox.y2;
         showAppsButton.allocate(childBox, flags);
     }
 });



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