sfatihk / electron-tray-window

🖼️ Generates custom tray windows with Electron.js
MIT License
171 stars 17 forks source link

No way to offset the main window to center above the taskbar icon. #5

Closed Ganoodles closed 4 years ago

sfatihk commented 4 years ago

It's a good feature @Ganoosh .

Maybe, you can use size and margin props.

//...

trayWindow.setOptions({...});

//...

differentWindow = new BrowserWindow(...);

trayWindow.setWindowSize({
    width    : 200,    //optional
    height   : 300,   //optional
    margin_x : 10,  //optional
    margin_y : 10   //optional
});

//..