added custom titlebar to electron

This commit is contained in:
2025-12-05 12:47:19 +01:00
parent db74808e6c
commit 0da70f8e6a
20 changed files with 497 additions and 229 deletions

10
preload.js Normal file
View File

@@ -0,0 +1,10 @@
const { contextBridge, ipcRenderer } = require("electron");
contextBridge.exposeInMainWorld("electronAPI", {
isElectron: true,
win: {
minimize: () => ipcRenderer.send("win:minimize"),
maximize: () => ipcRenderer.send("win:maximize"),
close: () => ipcRenderer.send("win:close")
}
});