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
This commit is contained in:
parent
3f61f39ae3
commit
7e70dfdf4c
@ -792,11 +792,12 @@ Notification.prototype = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
_bannerBoxAllocate: function(actor, box, flags) {
|
_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 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 titleBox = new Clutter.ActorBox();
|
||||||
let titleBoxW = Math.min(titleNatW, availWidth);
|
let titleBoxW = Math.min(titleNatW, availWidth);
|
||||||
if (this._titleDirection == St.TextDirection.RTL) {
|
if (this._titleDirection == St.TextDirection.RTL) {
|
||||||
|
Loading…
Reference in New Issue
Block a user