Fix desktop file menu on Linux (#7106)

This commit is contained in:
Anna Khismatullina 2024-11-05 21:21:17 +07:00 committed by GitHub
parent e3353df572
commit f2f925a2f0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -16,6 +16,7 @@
import { Menu, MenuItemConstructorOptions, type BrowserWindow } from 'electron'
const isMac = process.platform === 'darwin'
const isLinux = process.platform === 'linux'
export const addMenus = (getWindow: () => BrowserWindow, sendCommand: (cmd: string, ...args: any[]) => void): void => {
const template: MenuItemConstructorOptions[] = [
@ -24,7 +25,7 @@ export const addMenus = (getWindow: () => BrowserWindow, sendCommand: (cmd: stri
submenu: [
{
label: 'Settings',
accelerator: 'Meta+,',
accelerator: isLinux ? 'Ctrl+,' : 'Meta+,',
click: () => { sendCommand('open-settings') }
},
{