From f3eeb94c90b9f3d189df33e634d2f4706919d842 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20Dre=C3=9Fler?= Date: Wed, 4 Dec 2019 21:37:34 +0100 Subject: [PATCH] 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 e122fda41..183d719c8 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();