messageTray: use alignment rather than gravity to position the summary

Actors in clutter are supposed to be re-allocated with
Clutter.AllocationFlags.ABSOLUTE_ORIGIN_CHANGED if they move relative
to the screen, even if they don't move relative to their parent.
Currently this does not work correctly for actors inside containers
with non-northwest gravity. This is probably a fixable bug, but
gravity has messed up other things in the past too, so let's just not
use it.

This change ensures that summary trayicons are re-allocated when the
summary animates, and is part of the fix for
https://bugzilla.gnome.org/show_bug.cgi?id=635695
This commit is contained in:
Dan Winship 2011-01-07 11:59:20 -05:00
parent c08021d91f
commit 4c4a703e63

View File

@ -916,7 +916,7 @@ MessageTray.prototype = {
this._notification = null; this._notification = null;
this._notificationClickedId = 0; this._notificationClickedId = 0;
this._summaryBin = new St.Bin({ anchor_gravity: Clutter.Gravity.NORTH_EAST }); this._summaryBin = new St.Bin({ x_align: St.Align.END });
this.actor.add_actor(this._summaryBin); this.actor.add_actor(this._summaryBin);
this._summary = new St.BoxLayout({ name: 'summary-mode', this._summary = new St.BoxLayout({ name: 'summary-mode',
reactive: true, reactive: true,
@ -1008,9 +1008,8 @@ MessageTray.prototype = {
this.actor.width = primary.width; this.actor.width = primary.width;
this._notificationBin.x = 0; this._notificationBin.x = 0;
this._notificationBin.width = primary.width; this._notificationBin.width = primary.width;
this._summaryBin.x = 0;
// These work because of their anchor_gravity this._summaryBin.width = primary.width;
this._summaryBin.x = primary.width;
}, },
contains: function(source) { contains: function(source) {