[gnome-shell] checkBox: Fix expand and align properties



commit f3eeb94c90b9f3d189df33e634d2f4706919d842
Author: Jonas Dreßler <verdre v0yd nl>
Date:   Wed Dec 4 21:37:34 2019 +0100

    checkBox: Fix expand and align properties
    
    In f2bd39b20c89c1896c124f1dccdd587aa544e45c, the expand property for
    checkboxes was accidentally set to the grandchild (the StBin), instead
    of the child (the StBoxLayout) of the StButton. Fix that and let the
    BoxLayout expand instead of the Bin.
    
    https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/885

 js/ui/checkBox.js | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)
---
diff --git a/js/ui/checkBox.js b/js/ui/checkBox.js
index e122fda41e..183d719c8d 100644
--- a/js/ui/checkBox.js
+++ b/js/ui/checkBox.js
@@ -4,7 +4,10 @@ const { Clutter, GObject, Pango, St } = imports.gi;
 var CheckBox = GObject.registerClass(
 class CheckBox extends St.Button {
     _init(label) {
-        let container = new St.BoxLayout();
+        let container = new St.BoxLayout({
+            x_expand: true,
+            y_expand: true,
+        });
         super._init({
             style_class: 'check-box',
             child: container,
@@ -13,11 +16,7 @@ class CheckBox extends St.Button {
             can_focus: true,
         });
 
-        this._box = new St.Bin({
-            x_expand: true,
-            y_expand: true,
-            y_align: Clutter.ActorAlign.START,
-        });
+        this._box = new St.Bin({ y_align: Clutter.ActorAlign.START });
         container.add_actor(this._box);
 
         this._label = new St.Label();


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