koush / electron-chrome

Other
970 stars 68 forks source link

Implementation Question #27

Open joshelson opened 7 years ago

joshelson commented 7 years ago

First, @koush, thanks a bunch for all the effort here. This is a really helpful project.

Just what I hope is a quick question on practical implementation here... assuming I'm intending to continue to develop Chrome App and create downstream installs in Electron for Windows and OS X.

I have an app I need to open with no frame and need to disable resizing. Something like this in pure Electron:

   BrowserWindow({
        frame: false,
        resizable: false,
        width: 300,
        height: 700
    });

Any idea on what the best way to allow our packager to pick up and deploy these customizations without having to hack up the package each time?

koush commented 7 years ago

https://stackoverflow.com/questions/22479716/fixed-window-size-for-chrome-web-app

Here's roughly where you'd detect min/max Width/Height are the same, and pass through the resizable flag.

https://github.com/koush/electron-chrome/blob/master/chrome/api/chrome-app.js#L107

koush commented 7 years ago

Basically, just massaging chrome.app.window.create options into BrowserWindow options.