window-list: Don't use homogeneous layout

We want all buttons in the window list to have the same size,
but that's already achieved via max/natural-width in the CSS.

Not enforcing the equal size via the layout manager will allow
buttons to temporarily have a different size when we start
animating additions and removals.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/325>
This commit is contained in:
Florian Müllner
2024-06-25 19:24:35 +02:00
parent 17c963b63f
commit f76f9e8220

View File

@@ -729,22 +729,15 @@ class WindowList extends St.Widget {
let box = new St.BoxLayout({x_expand: true, y_expand: true});
this.add_child(box);
let layout = new Clutter.BoxLayout({homogeneous: true});
this._windowList = new St.Widget({
this._windowList = new St.BoxLayout({
style_class: 'window-list',
reactive: true,
layout_manager: layout,
x_align: Clutter.ActorAlign.START,
x_expand: true,
y_expand: true,
});
box.add_child(this._windowList);
this._windowList.connect('style-changed', () => {
let node = this._windowList.get_theme_node();
let spacing = node.get_length('spacing');
this._windowList.layout_manager.spacing = spacing;
});
this._windowList.connect('scroll-event', this._onScrollEvent.bind(this));
let indicatorsBox = new St.BoxLayout({x_align: Clutter.ActorAlign.END});