How to set width of the Electron Menu?

Below is a picture of the Menu open with 2 options, but I want to define the width of the Menu:

contextmenu

Calling the Menu:

import { Menu } from "electron";

const contextMenu = Menu.buildFromTemplate(template as Electron.MenuItem[]);
contextMenu.popup({ window: win as BrowserWindow, ...args.options });

Leave a Comment