#Windows 11 make a background with acrylic effect

15 messages · Page 1 of 1 (latest)

whole jewel
#

You may need to update Windows 11.
Seems that this new API isn't perfect just yet.

In the meantime, use Glasstron for now.

npm install glasstron-clarity

Then define Glasstron in your main process:

const glasstron = require('glasstron-clarity');

Then for your window, just enable blur, so add this option to it:

blur: true

This will give you Acrylic, since Mica support never made it into Glasstron.

More on Glasstron Clarity: https://sudovanilla.com/code/Korbs/Glasstron-Clarity/src/commit/7f5258b8acaaf742f13a10a18aa02369abe0e684

More on Electron's API for built-in support for Acrylic/Mica: https://github.com/electron/electron/pull/38163

whole jewel
#

@slender skiff Have you solved your issue?

slender skiff
#

I've just seen the message, I'll test it in 1 hour.

whole jewel
#

Alright, let me know how things go.

slender skiff
#

there are a lib for types ?

whole jewel
#

One moment...

#

Glasstron 2.0 was suppose to be rewritten in TypeScript.
Not sure what I can do, but there should be a way to make it work.

slender skiff
whole jewel
#

Try "npm i --save-dev @types/glasstron-clarity"?

slender skiff
whole jewel
#

Well this sucks. Glasstron was the best way to do this before Electron added "materialBackground".
Other options don't support cross-platform, only Glasstron did, also I should note that Glasstron is discontinued along with my maintained version.

Best you figure out how the new API works.

slender skiff
#

its only for windows

whole jewel
#

There should be packages then for specifically Acylic/Mica.