[gnome-shell/wip/fmuellner/notification-redux: 84/88] layout: Don't offset trayBox when panel is hidden



commit 1a7830de33db16969c1dba354a145adedccd1b57
Author: Florian Müllner <fmuellner gnome org>
Date:   Sat Feb 14 16:03:28 2015 +0100

    layout: Don't offset trayBox when panel is hidden
    
    The panel is not visible when in fullscreen, but critical notifications
    may still be shown - having them pop out from where the panel would be
    looks unpolished, so adjust the trayBox accordingly.

 js/ui/layout.js |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/js/ui/layout.js b/js/ui/layout.js
index ad63804..5de73d2 100644
--- a/js/ui/layout.js
+++ b/js/ui/layout.js
@@ -244,10 +244,13 @@ const LayoutManager = new Lang.Class({
 
         this.trayBox = new St.Widget({ name: 'trayBox',
                                        layout_manager: new Clutter.BinLayout() }); 
-        this.trayBox.add_constraint(new MonitorConstraint({ primary: true,
-                                                            work_area: true }));
         this.addChrome(this.trayBox, { affectsInputRegion: false });
 
+        let trayConstraint = new MonitorConstraint({ primary: true });
+        this.trayBox.add_constraint(trayConstraint);
+        this.panelBox.bind_property('visible', trayConstraint, 'work-area',
+                                    GObject.BindingFlags.SYNC_CREATE);
+
         this.modalDialogGroup = new St.Widget({ name: 'modalDialogGroup',
                                                 layout_manager: new Clutter.BinLayout() });
         this.uiGroup.add_actor(this.modalDialogGroup);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]