[polari/gnome-3-12] mainWindow: Offset bottom notifications to appear above entry area



commit 36b043d2d294352ced08ee6ed14899890ec2270b
Author: Florian Müllner <fmuellner gnome org>
Date:   Fri May 30 15:44:18 2014 +0200

    mainWindow: Offset bottom notifications to appear above entry area
    
    Since the hierarchy was simplified to use a single stack for both
    chat log and entries, the overlay which holds in-app notifications
    now extends to the bottom of the window. However we don't want
    notifications to cover the entry area, so offset them appropriately
    to restore the previous behavior.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=730964

 src/mainWindow.js |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)
---
diff --git a/src/mainWindow.js b/src/mainWindow.js
index a0b06a2..aa57879 100644
--- a/src/mainWindow.js
+++ b/src/mainWindow.js
@@ -256,6 +256,17 @@ const MainWindow = new Lang.Class({
         overlay.add_overlay(app.notificationQueue.widget);
         overlay.add_overlay(app.commandOutputQueue.widget);
 
+        // command output notifications should not pop up over
+        // the input area, but appear to emerge from it, so
+        // set up an appropriate margin - this relies on the
+        // last widget added to the size group at this point
+        // is the room stack's placeholder entry, which will
+        // never be destroyed
+        sizeGroup.get_widgets()[0].connect('size-allocate',
+            function(w, rect) {
+                app.commandOutputQueue.widget.margin_bottom = rect.height - 1;
+            });
+
         this._titlebarRight = builder.get_object('titlebar_right');
         this._titlebarLeft = builder.get_object('titlebar_left');
 


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