electron / electron

:electron: Build cross-platform desktop apps with JavaScript, HTML, and CSS
https://electronjs.org
MIT License
113.02k stars 15.17k forks source link

Windows 10 Fluent Design / Acrylic material #11771

Closed marcinciarka closed 6 years ago

marcinciarka commented 6 years ago

Is there any chance that electron can get window background transparency with blur just like macOS vibrancy?

Fall Creators update gave us the acrylic material ability.

image

welcome[bot] commented 6 years ago

๐Ÿ‘‹ Thanks for opening your first issue here! If you're reporting a ๐Ÿž bug, please make sure you include steps to reproduce it. We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can.

To help make it easier for us to investigate your issue, please follow the contributing guidelines.

marcinciarka commented 6 years ago

Recommend use the electron-vibrancy.

Well, it's fine but:

codebytere commented 6 years ago

I'd recommend opening a PR to https://github.com/arkenthera/electron-vibrancy or posting an issue there, as this is most likely best done on the client-side for this case.

marcinciarka commented 6 years ago

most likely best done on the client-side for this case.

@codebytere: Electron has built-in support for macos vibrancy, why it can't support windows acrylic material out of the box?

DRSDavidSoft commented 6 years ago

@dreszczyk Someone actually made a windows acrylic module for electron! https://github.com/23phy/electron-acrylic

It's still in beta phase but I'm sure @23phy will complete it. Hopefully, at some point, this will get merged into the main electron builds, with a unified API just like macOS vibrancy.

23phy commented 6 years ago

I see only one problem here, the function SetWindowCompositionAttribute that I am using, which doesn't have such a great documentation, it can be changed anytime, and it's probably hard to maintain.

DRSDavidSoft commented 6 years ago

@23phy I see, but that API has been available for quite some time. If Microsoft decides to drop or change it, a fallback in Electron can be used โ€“ simply no acrylic effect.

Other programs (like Glass8 for instance) use the same undocumented call to enable Aero/Acrylic effect. It may fail to work if MS change it, but it isn't going to break the app, just the acrylic effect won't work.

I suggest this should be merged into Electron-Vibrancy or the Electron itself. There are quite a lot of projects that need this functionality and by deploying as an experimental feature, it can be tested out by beta users.

23phy commented 6 years ago

I'll see what I can do, gonna dive into the guts of electron ๐Ÿ˜‚ and make a PR. In the meantime, whoever needs that effect, can use the module.

DRSDavidSoft commented 6 years ago

@23phy That's awesome. BTW I suggested merging Vibrancy module with this, to get a unified endpoint call. e.g. set the transparent and acrylic/vibrancy once in the Electron app codebase, and get the same effect on macOS and Windows at the same time.

Don't know if it's easy/possible or not, but that'd be cool.

23phy commented 6 years ago

Vibrancy on macOS should have it's own option, because it has some parameters on how it should render the background. So instead of transparent: 'acrylic | vibrancy', should be two options:

Where vibrancy will be available only on macOS, and acrylic on Windows, and it's definitely possible, but let's just stick with what we have for now, maybe in the future.

DRSDavidSoft commented 6 years ago

I like the idea of having two separate packages, though it should be possible to set them at the same time (or query the platform before setting eac of them if available.) with the application client itself.

23phy commented 6 years ago

I don't quite understand ๐Ÿค”

El dom., 20 de may. de 2018 19:59, David Refoua notifications@github.com escribiรณ:

I like the idea of having two separate packages, though it should be possible to set them at the same time (or query the platform before setting eac of them if available.) with the application client itself.

โ€” You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/electron/electron/issues/11771#issuecomment-390495966, or mute the thread https://github.com/notifications/unsubscribe-auth/ALOp0IuhhAce863PwiPqhWF-fze5Mi0iks5t0aDzgaJpZM4Ryzrs .

rendomnet commented 3 years ago

Is this feature planned?

AmirAsghary commented 3 years ago

+1 we need this