How to 'align' and 'center' the PopUpMenu dropdown arrow?

I am working on some GUI configurations and need to center this ‘dropdown’ arrow. When the PopUpMenu is smaller, it defaults to the left. Is there any way to center this arrow?

Here is my code:

~t1_a_menu_array_arg_a = PopUpMenu(w, Rect(347.5, 11, 15, 10)).items_([“Arg”, “Dur”, “Atk”, “Rel”, “Rate”, “Pos”, “Buf”]).font_(Font([
].choose, 12));



Try making a regular Button and then using it to show a Menu - something like:

~menu = Menu(MenuAction("a"), MenuAction("b"), MenuAction("c")):
~button = Button().states_([["x"]]).front;
~button.action = { ~menu.front }.

You can trigger a Menu via basically any View, so you can even use UserView to just draw whatever you want.

Here’s a working example: ServerView.quark/ at master · scztt/ServerView.quark · GitHub

Awesome. This works well. Thanks for the knowledge!

Another quick example that fully reproduces the “modal” PopUpMenu behavior, where a single item can be selected:

~selectedItem = nil;

~menu = Menu(MenuAction("a"), MenuAction("b"), MenuAction("c"));;

	|menu, what, action|
		\aboutToShow, {{
				m.checked = (m == ~selectedItem)
		\triggered, {
			~selectedItem = action;
			menu.string = action.string;