auto-move-windows: Stop using header func for separators
GTK4 added built-in support for this common pattern, so use that instead. Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/148>
This commit is contained in:
@@ -40,8 +40,8 @@ class AutoMoveSettingsWidget extends Gtk.ScrolledWindow {
|
||||
this._list = new Gtk.ListBox({
|
||||
selection_mode: Gtk.SelectionMode.NONE,
|
||||
valign: Gtk.Align.START,
|
||||
show_separators: true,
|
||||
});
|
||||
this._list.set_header_func(this._updateHeader.bind(this));
|
||||
box.append(this._list);
|
||||
|
||||
const context = this._list.get_style_context();
|
||||
@@ -143,12 +143,6 @@ class AutoMoveSettingsWidget extends Gtk.ScrolledWindow {
|
||||
this._settings.unblock_signal_handler(this._changedId);
|
||||
this._updateAction.enabled = true;
|
||||
}
|
||||
|
||||
_updateHeader(row, before) {
|
||||
if (!before || row.get_header())
|
||||
return;
|
||||
row.set_header(new Gtk.Separator());
|
||||
}
|
||||
});
|
||||
|
||||
const RuleRow = GObject.registerClass({
|
||||
|
||||
Reference in New Issue
Block a user