sfatihk / electron-tray-window

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

window border #2

Closed peterremote1980 closed 5 years ago

peterremote1980 commented 5 years ago

Hi

If i do this, the window has no border:

    win = TrayWindow.setOptions({
        trayIconPath: path.join('image/sharepoint2019.png'),
        windowUrl: `file://${path.join(__dirname, '/../index.html')}`,
        width: 340,
        height: 380,
    });

But if i do, i have border, how to fix it?

    mainWindow = new BrowserWindow({
        width: 800,
        height: 600,
    })

    mainWindow.loadFile('index.html')

    win = TrayWindow.setOptions({
        trayIconPath: path.join('image/sharepoint2019.png'),
        window: mainWindow,
        width: 340,
        height: 380,
    });

thanks

sfatihk commented 5 years ago

Hi Peter, I fixed that issue, you can check d9ee608.

I added new optional framed property, for window frames. Now you can create window with frame. But i didn't include the window menu.

TrayWindow.setOptions({
  trayIconPath: path.join('image/sharepoint2019.png'),
  window: mainWindow,
  width: 340,
  height: 380,
  framed : true ///////////
});

Thanks you for contributions