Adjust message-tray on resolution changes

https://bugzilla.gnome.org/show_bug.cgi?id=608058
This commit is contained in:
Florian Müllner 2010-01-25 19:28:35 +01:00
parent 0a566f70b6
commit 4006d7d57f

View File

@ -92,11 +92,9 @@ MessageTray.prototype = {
this.actor = new St.BoxLayout({ name: 'message-tray',
reactive: true });
let primary = global.get_primary_monitor();
this.actor.x = 0;
this.actor.y = primary.height - 1;
this.actor.width = primary.width;
global.connect('screen-size-changed',
Lang.bind(this, this._setSizePosition));
this._setSizePosition();
this._summaryBin = new St.Bin({ x_align: St.Align.END });
this.actor.add(this._summaryBin, { expand: true });
@ -123,6 +121,14 @@ MessageTray.prototype = {
this._icons = {};
},
_setSizePosition: function() {
let primary = global.get_primary_monitor();
this.actor.x = 0;
this.actor.y = primary.height - 1;
this.actor.width = primary.width;
},
contains: function(source) {
return this._sources.hasOwnProperty(source.id);
},