Skip to content

Commit e3cc51b

Browse files
authored
feat: support frameless window in macos (#124)
1 parent 8615f84 commit e3cc51b

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

src/main/main.ts

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,17 @@ const createWindow = async () => {
182182
return path.join(RESOURCES_PATH, ...paths);
183183
};
184184

185+
let framelessOptions = {}
186+
187+
// Only for OSX right now. Needs to be tested for linux and windows
188+
if(process.platform === "darwin") {
189+
framelessOptions = {
190+
frame: false,
191+
titleBarStyle: "hidden" as "hidden",
192+
trafficLightPosition: { x: 16, y: 16 },
193+
}
194+
}
195+
185196
webAppWindow = new BrowserWindow({
186197
show: false,
187198
width: 1310,
@@ -194,8 +205,9 @@ const createWindow = async () => {
194205
sandbox: false,
195206
preload: path.join(__dirname, "preload.js"),
196207
},
208+
...framelessOptions
197209
});
198-
webAppWindow.webContents.setVisualZoomLevelLimits(1, 3)
210+
webAppWindow.webContents.setVisualZoomLevelLimits(1, 3);
199211

200212
new AutoUpdate(webAppWindow);
201213
remote.enable(webAppWindow.webContents);

0 commit comments

Comments
 (0)