messageTray: Don't use gravity for notificationBin

When the notificaionBin has an odd width this could result into
loosing pixel aligment (and ugly looking font).

As the notification is already reactive make it non reactive and
remove the use of garvity.

https://bugzilla.gnome.org/show_bug.cgi?id=614702
This commit is contained in:
Adel Gadllah 2010-04-08 20:36:20 +02:00
parent df09e199b0
commit 752c25bb7d

View File

@ -394,8 +394,7 @@ MessageTray.prototype = {
track_hover: true }); track_hover: true });
this.actor.connect('notify::hover', Lang.bind(this, this._onTrayHoverChanged)); this.actor.connect('notify::hover', Lang.bind(this, this._onTrayHoverChanged));
this._notificationBin = new St.Bin({ reactive: true, this._notificationBin = new St.Bin();
anchor_gravity: Clutter.Gravity.NORTH });
this.actor.add(this._notificationBin); this.actor.add(this._notificationBin);
this._notificationBin.hide(); this._notificationBin.hide();
this._notificationQueue = []; this._notificationQueue = [];
@ -463,9 +462,10 @@ MessageTray.prototype = {
this.actor.x = primary.x; this.actor.x = primary.x;
this.actor.y = primary.y + primary.height - 1; this.actor.y = primary.y + primary.height - 1;
this.actor.width = primary.width; this.actor.width = primary.width;
this._notificationBin.x = 0;
this._notificationBin.width = primary.width;
// These work because of their anchor_gravity // These work because of their anchor_gravity
this._notificationBin.x = primary.width / 2;
this._summaryBin.x = primary.width; this._summaryBin.x = primary.width;
this._summaryNotificationBin.x = primary.width; this._summaryNotificationBin.x = primary.width;
}, },