[gnome-shell/gbsneto/40-stuff: 6/68] overviewControls: Make DashFader an St.Bin subclass




commit 6ec63349031a6aa5f8cae871673e1f37bff52337
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date:   Wed Jan 20 18:28:33 2021 -0300

    overviewControls: Make DashFader an St.Bin subclass
    
    So that it inherits the bin layout manager, and properly allocates
    the Dash with the given allocation, instead of blindly allocating
    it with its preferred size like the fixed layout does.

 js/ui/overviewControls.js | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/js/ui/overviewControls.js b/js/ui/overviewControls.js
index af420c5289..dbb2035287 100644
--- a/js/ui/overviewControls.js
+++ b/js/ui/overviewControls.js
@@ -11,16 +11,16 @@ const Overview = imports.ui.overview;
 var SIDE_CONTROLS_ANIMATION_TIME = Overview.ANIMATION_TIME;
 
 var DashFader = GObject.registerClass(
-class DashFader extends St.Widget {
+class DashFader extends St.Bin {
     _init(dash) {
         super._init({
+            child: dash,
             x_expand: true,
             x_align: Clutter.ActorAlign.CENTER,
             y_align: Clutter.ActorAlign.END,
         });
 
         this._dash = dash;
-        this.add_child(this._dash);
 
         Main.overview.connect('window-drag-begin', this._onWindowDragBegin.bind(this));
         Main.overview.connect('window-drag-cancelled', this._onWindowDragEnd.bind(this));


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