23phy / ewc Goto Github PK
View Code? Open in Web Editor NEWNative window composition on Windows for Electron apps.
License: MIT License
Native window composition on Windows for Electron apps.
License: MIT License
Just like electron has the vibrancy option for macOS, it should also have an acrylic option for Windows. This would be easier in making more fluent-enabled apps using electron.
A really cool use-case is in Hyper. You can make extensions for hyper which are simply glorified node modules.
Example from the verminal theme where it sets vibrancy!:
https://github.com/defringe/verminal/blob/master/index.js#L2
This could be setAcrylic
You could make the argument that verminal could already use electron-acrylic, but it would require them to have all the dev requirements like python, and the C++ compiler. That's quite extensive for a theme for a terminal.
Having electron-acrylic as a part of electron gives it that 1st class experience!
Hi there,
LOVE this project! I was able to get your example going really quickly.
I was attempting to get this working in verminal which is a theme for hyper but hit a snag.
It looks like in your example:
mainWindow = new BrowserWindow({
height: 500,
width: 800,
transparent: true,
frame: false
});
mainWindow.loadURL('file://' + __dirname + '/index.html');
electronAcrylic.setAcrylic(mainWindow, 0xFFFFFF);
if you remove the frame: false
the acrylic is no longer present
For reference, I was working off of:
https://github.com/electron/electron-quick-start
Your project is awesome. But I have installed python 3 bcs I am a python developer too. Node-gyp is dying. Why you choosed this? This require python 2. Many alternative including by google.
Hi,
[Issue] Ewc is literally slow when dragging arcylic windows.
[Tried] 1. updated to electron@latest; 2. updated to windows-build tools 2019 with 18362 SDK.
[Request] If possible and willing,
Thanks for your efforts. :)
Hi bro, is possible add acrylic to HTML elements like divs, Navs, etc.?
Am I right in assuming the hex color being provided is 0xaabbggrr
i.e. in the example 0x14800020
is #20008014
?
I've been searching the undocumented documentations for SetWindowCompositionAttribute
but couldn't find the info in the color/tint feild
(Note: I followed all steps.)
When I require the module and apply the .setAcrylic, it errors. The error seems to be a failed relative path that includes \\?\
before the actual path for some reason.
Error:
Error: Couldn't find specified module. \\?\C:\Users\hinok\Workspace\Scar\node_modules\electron-acrylic\build\Release\ElectronAcrylic.node at process.module.(anonymous function) [as dlopen] (ELECTRON_ASAR.js:160:31) at Object.Module._extensions..node (internal/modules/cjs/loader.js:722:18) at Object.module.(anonymous function) [as .node] (ELECTRON_ASAR.js:160:31) at Module.load (internal/modules/cjs/loader.js:602:32) at tryModuleLoad (internal/modules/cjs/loader.js:541:12) at Function.Module._load (internal/modules/cjs/loader.js:533:3) at Module.require (internal/modules/cjs/loader.js:640:17) at require (internal/modules/cjs/helpers.js:20:18) at bindings (C:\Users\hinok\Workspace\Scar\node_modules\electron-acrylic\node_modules\bindings\bindings.js:84:48) at Object.<anonymous> (C:\Users\hinok\Workspace\Scar\node_modules\electron-acrylic\index.js:1:199)
A current dependency, hoek
version 2.16.1
, has a moderate level vulnerability (MAID exploit) listed in the CVE database, which extends to repositories which rely on electron-acrylic
as a dependency.
hoek
should be updated to at least version 5.0.3
to resolve this issue
Is it possible to set a region for the blur? I imagine blurring the entire window background an then painting over it could drain some batteries.
Hi, after launching example moving window with acrylic effect on causes huge lag for window
One possibly fixable issue with the acrylic effect is that, when Windows is in battery saver mode, changing to acrylic mode (ewc.setAcrylic
) from any other transparency mode including blur behind and transparent gradient gives a broken, fully transparent window.
So enabling acrylic from a disabled state works, but if you set it to blur behind, and then to acrylic, it breaks and you just get a fully clear window.
This only happens in battery saver mode, probably because acrylic is meant to be globally disabled in this mode to save battery.
I don't know, but maybe this can be fixed, because you can get acrylic working in battery saver mode by disabling and re-enabling again, but this produces a flicker. I ran into this issue when solving the laggy drag issue by disabling acrylic on drag. Hopefully maybe it can be fixed because it is annoying the hell out of me!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.