Merge branch 'dash-separator' into 'main'

dash: Fixes wrong separator position

Closes #3966 and #3799

See merge request GNOME/gnome-shell!1973
This commit is contained in:
Raghuveer Kasaraneni 2024-06-27 16:45:03 +00:00
commit 4394f1885a

View file

@ -826,7 +826,17 @@ export const Dash = GObject.registerClass({
});
this._box.add_child(this._separator);
}
let pos = nFavorites + this._animatingPlaceholdersCount;
let pos = nFavorites;
let itemsBeforeSeparator = 0;
for (let item of this._box.get_children()) {
if (item.animatingOut)
pos++;
itemsBeforeSeparator++;
// Assuming only one icon is moved at a time
// Or else we need to track removed favorite items
if (itemsBeforeSeparator > nFavorites)
break;
}
if (this._dragPlaceholder)
pos++;
this._box.set_child_at_index(this._separator, pos);