MessageTray: fix unexpanded height when receiving multiple telepathy messages

ClutterBinLayout is so amazingly broken: it uses the y_expand property to
find out if the children needs to honor alignment/fill, but that property is
"bubbled up" from the grand-children, so the notificationWidget would notice
the y_expand on the notificationBin (necessary to make the layout manager on
notificationWidget honor the alignment property for the bin), and would
receive the full height of the MessageTray actor from the parent's layout manager,
resulting in a notificationWidget shifting up, with the notification detached
from the screen.

https://bugzilla.gnome.org/show_bug.cgi?id=683628
This commit is contained in:
Giovanni Campagna 2012-09-08 18:54:50 +02:00
parent 48e7d732b9
commit 9f48adcff9

View File

@ -1379,7 +1379,9 @@ const MessageTray = new Lang.Class({
this.actor.connect('notify::hover', Lang.bind(this, this._onTrayHoverChanged));
this._notificationWidget = new St.Widget({ name: 'notification-container',
y_align: Clutter.ActorAlign.START,
x_align: Clutter.ActorAlign.CENTER,
y_expand: true,
x_expand: true,
layout_manager: new Clutter.BinLayout() });
this.actor.add_actor(this._notificationWidget);