[gnome-shell] Adjust message-tray on resolution changes
- From: Florian Müllner <fmuellner src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gnome-shell] Adjust message-tray on resolution changes
- Date: Tue, 26 Jan 2010 17:22:52 +0000 (UTC)
commit 4006d7d57fec0519d74006d14c24095e9b808d39
Author: Florian Müllner <fmuellner src gnome org>
Date: Mon Jan 25 19:28:35 2010 +0100
Adjust message-tray on resolution changes
https://bugzilla.gnome.org/show_bug.cgi?id=608058
js/ui/messageTray.js | 16 +++++++++++-----
1 files changed, 11 insertions(+), 5 deletions(-)
---
diff --git a/js/ui/messageTray.js b/js/ui/messageTray.js
index 60dbebc..b045894 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);
},
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]