Hi , I’m trying to add an icon to a PopupSwitchMenu i created and was wondering if there was a way to do this? The code below i can create a Toggle switch with a text label “Menu Item” but i cannot figure out a way to add an icon before the text.
this.Toggle = new PopupMenu.PopupSwitchMenuItem("Menu Label", false, {});
this.menu.addMenuItem(this.Toggle);
But note that the reason that there is no dedicated API is that the combination of switches and labels is an alien pattern in GNOME design (both in gnome-shell and GTK/libadwaita). So you can do it, but it will be a bit weird.