[gnome-shell] messageTray: Fix line wrapping
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] messageTray: Fix line wrapping
- Date: Tue, 20 Sep 2011 20:06:17 +0000 (UTC)
commit 7e70dfdf4c78a39678f91e77f4917f004a740a0f
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Tue Sep 20 15:52:42 2011 -0400
messageTray: Fix line wrapping
Clutter 1.4 had a bug where it would wrap when it wasn't supposed to, and we
were unknowingly relying on it. Explicitly pass the available width/height
to get a perfect allocation.
https://bugzilla.gnome.org/show_bug.cgi?id=659633
js/ui/messageTray.js | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/js/ui/messageTray.js b/js/ui/messageTray.js
index 9476d7a..ef0d593 100644
--- a/js/ui/messageTray.js
+++ b/js/ui/messageTray.js
@@ -792,11 +792,12 @@ Notification.prototype = {
},
_bannerBoxAllocate: function(actor, box, flags) {
- let [titleMinW, titleNatW] = this._titleLabel.get_preferred_width(-1);
- let [titleMinH, titleNatH] = this._titleLabel.get_preferred_height(-1);
- let [bannerMinW, bannerNatW] = this._bannerLabel.get_preferred_width(-1);
let availWidth = box.x2 - box.x1;
+ let [titleMinW, titleNatW] = this._titleLabel.get_preferred_width(-1);
+ let [titleMinH, titleNatH] = this._titleLabel.get_preferred_height(availWidth);
+ let [bannerMinW, bannerNatW] = this._bannerLabel.get_preferred_width(availWidth);
+
let titleBox = new Clutter.ActorBox();
let titleBoxW = Math.min(titleNatW, availWidth);
if (this._titleDirection == St.TextDirection.RTL) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]