"Buttons" in MenuItem


#1

Hello,

I want a menu same Brave for Zoom item. Is it possible to do that with MenuItem, because I don’t find, or must I to do custom menu without MenuItem ?

My code :

> const menu_parameter = new Menu()
> ...
> menu_parameter.append(new MenuItem({ label: 'Zoom-', click() { zoomLess() }, accelerator: 'CmdOrCtrl+Plus' }))
> menu_parameter.append(new MenuItem({ label: 'Zoom+', click() { zoomMore() }, accelerator: 'CmdOrCtrl+=' }))
> menu_parameter.append(new MenuItem({ type: 'separator' }))
>...
> function openParameterMenu(position, rect) {
>     menuX = (Math.round(rect.left) - 225);
>     menuY = Math.round(position.top + rect.width + 40);
>     menu_parameter.popup(remote.getCurrentWindow(), { x: menuX, y: menuY })
> }

Thank you