This commit is contained in:
Amelia 2026-05-30 18:52:41 +01:00 committed by GitHub
commit 0d363192da
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 10 additions and 1 deletions

View File

@ -149,7 +149,7 @@ export function createMainWindow() {
// configure spellchecker context menu
mainWindow.webContents.on("context-menu", (_, params) => {
const menu = new Menu();
if (params.isEditable) {
// add all suggestions
for (const suggestion of params.dictionarySuggestions) {
menu.append(
@ -180,6 +180,15 @@ export function createMainWindow() {
click() {
config.spellchecker = !config.spellchecker;
},
}),
);
}
menu.append(
new MenuItem({
label: "Copy Image",
visible: params.hasImageContents,
click: () => mainWindow.webContents.copyImageAt(params.x, params.y),
}),
);