|
|
|
@ -26,6 +26,7 @@ let bar = menubar({
|
|
|
|
|
icon: path.join(__dirname, "..", "assets", "icon.png"),
|
|
|
|
|
"preload-window": true,
|
|
|
|
|
"always-on-top": true,
|
|
|
|
|
"window-position": "topCenter",
|
|
|
|
|
width: 700,
|
|
|
|
|
height: baseHeight
|
|
|
|
|
});
|
|
|
|
@ -42,7 +43,8 @@ bar.on("ready", () => {
|
|
|
|
|
|
|
|
|
|
bar.on("after-show", () => {
|
|
|
|
|
bar.window.setAlwaysOnTop(true);
|
|
|
|
|
bar.window.focusOnWebView();
|
|
|
|
|
bar.window.setResizable(false);
|
|
|
|
|
bar.window.focus();
|
|
|
|
|
|
|
|
|
|
bar.window.webContents.send("focusSearch");
|
|
|
|
|
})
|
|
|
|
@ -61,7 +63,11 @@ ipcMain.on("resize", (event, newSize) => {
|
|
|
|
|
|
|
|
|
|
/* Temporary workaround until maxogden/menubar#125 is resolved */
|
|
|
|
|
bar.window.setSize(bar.getOption("width"), bar.getOption("height"));
|
|
|
|
|
})
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
ipcMain.on("closeSearch", (event) => {
|
|
|
|
|
bar.hideWindow();
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
Promise.try(() => {
|
|
|
|
|
return mkdirpAsync(appDirectories.userData());
|
|
|
|
|