js: Explicitly set expand of St.Bin children

Right now, St.Bin ignores the child's expand properties, and
instead expands the child if its alignment is set to FILL.

This will change when we replace the custom allocation code
with a layout manager, so to prepare for that, set the expand
property where needed to keep the expected behavior.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3046>
This commit is contained in:
Florian Müllner
2023-12-06 15:46:12 +01:00
committed by Marge Bot
parent ef2e96bb32
commit b02800f8b5
6 changed files with 15 additions and 5 deletions

View File

@ -62,7 +62,7 @@ export const QuickToggle = GObject.registerClass({
...params,
});
this._box = new St.BoxLayout();
this._box = new St.BoxLayout({x_expand: true});
this.set_child(this._box);
const iconProps = {};
@ -167,7 +167,7 @@ export const QuickMenuToggle = GObject.registerClass({
this.add_style_class_name('quick-menu-toggle');
this._box = new St.BoxLayout();
this._box = new St.BoxLayout({x_expand: true});
this.set_child(this._box);
const contents = new QuickToggle({
@ -264,7 +264,7 @@ export const QuickSlider = GObject.registerClass({
hasMenu: true,
});
const box = new St.BoxLayout();
const box = new St.BoxLayout({x_expand: true});
this.set_child(box);
const iconProps = {};