windowMenu: Use NONE ornament by default

We now hide ornaments by default. As some of the items in the
window menu can be checked, that means that they will now shift
horizontally, and no longer align with other menu items when
checked.

That's quite bad, and as the items in question don't form a
distinctive group/section, adding back the spacing only to
those two items would still look fairly awkward.

So revert back to the previous behavior for this particular menu,
and default to the NONE ornament.

Closes https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/6962

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2926>
This commit is contained in:
Florian Müllner 2023-08-30 05:44:46 +02:00 committed by Marge Bot
parent 11fa0301d5
commit 8538a42943

View File

@ -211,6 +211,12 @@ export class WindowMenu extends PopupMenu.PopupMenu {
if (!window.can_close()) if (!window.can_close())
item.setSensitive(false); item.setSensitive(false);
} }
addAction(label, callback) {
const item = super.addAction(label, callback);
item.setOrnament(PopupMenu.Ornament.NONE);
return item;
}
} }
export class WindowMenuManager { export class WindowMenuManager {