[gnome-shell] popupMenu: do height-for-width negotiation
- From: Dan Winship <danw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] popupMenu: do height-for-width negotiation
- Date: Thu, 8 Sep 2011 12:46:56 +0000 (UTC)
commit caade78e79b63d2682df89a5e05bb4a13649a39f
Author: Dan Winship <danw gnome org>
Date: Mon Aug 22 14:29:22 2011 -0400
popupMenu: do height-for-width negotiation
https://bugzilla.gnome.org/show_bug.cgi?id=652837
js/ui/popupMenu.js | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/js/ui/popupMenu.js b/js/ui/popupMenu.js
index 2551d68..ef8a549 100644
--- a/js/ui/popupMenu.js
+++ b/js/ui/popupMenu.js
@@ -214,7 +214,7 @@ PopupBaseMenuItem.prototype = {
let child = this._children[i];
if (i > 0)
width += this._spacing;
- let [min, natural] = child.actor.get_preferred_width(forHeight);
+ let [min, natural] = child.actor.get_preferred_width(-1);
width += natural;
}
}
@@ -225,7 +225,7 @@ PopupBaseMenuItem.prototype = {
let height = 0;
for (let i = 0; i < this._children.length; i++) {
let child = this._children[i];
- let [min, natural] = child.actor.get_preferred_height(-1);
+ let [min, natural] = child.actor.get_preferred_height(forWidth);
if (natural > height)
height = natural;
}
@@ -319,7 +319,7 @@ PopupBaseMenuItem.prototype = {
}
}
- let [minHeight, naturalHeight] = child.actor.get_preferred_height(-1);
+ let [minHeight, naturalHeight] = child.actor.get_preferred_height(childBox.x2 - childBox.x1);
childBox.y1 = Math.round(box.y1 + (height - naturalHeight) / 2);
childBox.y2 = childBox.y1 + naturalHeight;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]