[gnome-shell/wip/fmuellner/dont-disturb: 1/3] dateMenu: Bind pad visibility to indicator



commit 398b3ddc78499c249f191994b5b1bb712782b79e
Author: Florian Müllner <fmuellner gnome org>
Date:   Tue Jan 21 16:36:56 2020 +0100

    dateMenu: Bind pad visibility to indicator
    
    Currently the indicator pad requests a size of 0x0 if the corresponding
    indicator is hidden. Right now this is enough to balance out the indicator,
    but it won't be when we add spacing to the parent container.
    
    Properly hide the pad with the indicator to avoid that issue.
    
    https://gitlab.gnome.org/GNOME/gnome-shell/issues/239

 js/ui/dateMenu.js | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
---
diff --git a/js/ui/dateMenu.js b/js/ui/dateMenu.js
index 1fd6ccdbc2..005cc7d8e2 100644
--- a/js/ui/dateMenu.js
+++ b/js/ui/dateMenu.js
@@ -473,9 +473,11 @@ var IndicatorPad = GObject.registerClass(
 class IndicatorPad extends St.Widget {
     _init(actor) {
         this._source = actor;
-        this._source.connect('notify::visible', () => this.queue_relayout());
         this._source.connect('notify::size', () => this.queue_relayout());
         super._init();
+        this._source.bind_property('visible',
+            this, 'visible',
+            GObject.BindingFlags.SYNC_CREATE);
     }
 
     vfunc_get_preferred_width(forHeight) {


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