[gnome-shell] [panel] fix alignment of app menu label



commit fff04d51b7d1c23ac79c1005c05f763bd6651ea4
Author: Dan Winship <danw gnome org>
Date:   Tue May 25 09:34:01 2010 -0400

    [panel] fix alignment of app menu label
    
    we were aligning the top of the shadow with the top of the other labels,
    rather than aligning the label itself
    
    https://bugzilla.gnome.org/show_bug.cgi?id=618793

 js/ui/panel.js |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/js/ui/panel.js b/js/ui/panel.js
index c938e01..1104645 100644
--- a/js/ui/panel.js
+++ b/js/ui/panel.js
@@ -69,14 +69,14 @@ TextShadower.prototype = {
 
     _getPreferredWidth: function(actor, forHeight, alloc) {
         let [minWidth, natWidth] = this._label.get_preferred_width(forHeight);
-        alloc.min_size = minWidth;
-        alloc.natural_size = natWidth;
+        alloc.min_size = minWidth + 2;
+        alloc.natural_size = natWidth + 2;
     },
 
     _getPreferredHeight: function(actor, forWidth, alloc) {
         let [minHeight, natHeight] = this._label.get_preferred_height(forWidth);
-        alloc.min_size = minHeight;
-        alloc.natural_size = natHeight;
+        alloc.min_size = minHeight + 2;
+        alloc.natural_size = natHeight + 2;
     },
 
     _allocate: function(actor, box, flags) {
@@ -88,8 +88,8 @@ TextShadower.prototype = {
         let [minChildWidth, minChildHeight, natChildWidth, natChildHeight] =
             this._label.get_preferred_size();
 
-        let childWidth = Math.min(natChildWidth, availWidth);
-        let childHeight = Math.min(natChildHeight, availHeight);
+        let childWidth = Math.min(natChildWidth, availWidth - 2);
+        let childHeight = Math.min(natChildHeight, availHeight - 2);
 
         for (let i = 0; i < children.length; i++) {
             let child = children[i];



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