nwjs / nw.js

Call all Node.js modules directly from DOM/WebWorker and enable a new way of writing applications with all Web technologies.
https://nwjs.io
MIT License
40.34k stars 3.88k forks source link

Native window controls in frameless window? #3904

Open valeriansaliou opened 9 years ago

valeriansaliou commented 9 years ago

Hello,

Is there a way to display native OS controls buttons in a frameless window? (by position, or default)

It seems that Kitematic (which uses Electron) is able to display native controls (close/maximize/minimize) in its frameless window - I may be wrong, they may be emulating native buttons w/ custom sprites & OS detection.

I can't find this feature in the docs, but this would be nice to have in nw.js too.

Cheers,

Valérian.

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

shaynem commented 9 years ago

We ended up making our own and just using a if platform = function to change the CSS class - while not perfect... You can at least put them on the correct side of the window.

The only problem with that is I haven't found a way to know what Windows/osx version is in use so there is no way to display the correct ones for that particular version of OS. On 16 Oct 2015 6:10 pm, "Valérian Saliou" notifications@github.com wrote:

Hello,

Is there a way to display native OS controls buttons in a frameless window?

It seems that Kitematic (which uses Electron) is able to display native controls (close/maximize/minimize) in its frameless window - I may be wrong, they may be emulating native buttons w/ custom sprites & OS detection.

I can't find this feature in the docs, but this would be nice to have.

Cheers,

Valérian.

— Reply to this email directly or view it on GitHub https://github.com/nwjs/nw.js/issues/3904.

valeriansaliou commented 9 years ago

That's exactly what I ended up doing too.

OSX is a problem, since Apple provides 2 themes since Yosemite, with 2 color variations. There is no way we can acquire the theme in use from the nw.js app.