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