From 4006d7d57fec0519d74006d14c24095e9b808d39 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Mon, 25 Jan 2010 19:28:35 +0100 Subject: [PATCH] Adjust message-tray on resolution changes https://bugzilla.gnome.org/show_bug.cgi?id=608058 --- js/ui/messageTray.js | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/js/ui/messageTray.js b/js/ui/messageTray.js index 60dbebc0a..b045894b8 100644 --- a/js/ui/messageTray.js +++ b/js/ui/messageTray.js @@ -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); },