Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not run, need basic example #5

Open
dariomadeira opened this issue Oct 24, 2022 · 8 comments
Open

Not run, need basic example #5

dariomadeira opened this issue Oct 24, 2022 · 8 comments

Comments

@dariomadeira
Copy link

Hi! thanks for your work!
I have tried to create a basic example by cloning the electron js repository and adding mica-electron to it, I had some problems with the nove version, but when I try to run , I get an error in the main.js.
I used the example at https://www.npmjs.com/package/mica-electron
the problem seems to be that EFFECT is not defined, I had to fetch the values with const { PARAMS, VALUE, EFFECT, MicaBrowserWindow } = require('mica-electron'); but it doesn't work and gives me another error, is it possible to have a basic example? I haven't been able to run it at all. Thank you!
Captura de pantalla 2022-10-24 191142

@GregVido
Copy link
Owner

Hello, sorry it's a fail, replace

win.setVisualEffect(EFFECT.CORNER, PARAMS.CORNER.ROUNDSMALL); // Small rounded

By

win.setVisualEffect(PARAMS.CORNER, VALUE.CORNER.ROUNDSMALL); // Small rounded

@dariomadeira
Copy link
Author

Hello @GregVido your work is fabulous! Now I have made it run, but the background is still black, the title does have the Mica effect as it should be, I have no idea what I am doing wrong, I put the background of the transparent window but it seems not to take it. If you can tell me what's wrong, I'd appreciate it.
Captura de pantalla 2022-10-27 102645
Captura de pantalla 2022-10-27 102712

@GregVido
Copy link
Owner

Hello, thanks hehe, try to put a transparent background with css, you have an example of this here : https://github.com/GregVido/mica-electron/tree/main/files

@dariomadeira
Copy link
Author

Thanks @GregVido but it hasn't worked for me, I've tried making the css transparent, copying the files folder, using the devtools, trying to get code out of the example.js and it hasn't worked. He has told me that executeDwm is not defined when imported. I guess I'll wait a bit and try to do the steps from scratch again, I'll try to see what the correct steps are since I clone the electron repository and install this package. Thank you very very much!
Captura de pantalla 2022-10-27 190405
Captura de pantalla 2022-10-27 190300

@GregVido
Copy link
Owner

Hello, I don't understand why it's no work, why is your windows 11 version ? (windows + r -> winver)

@dariomadeira
Copy link
Author

he tried to do everything from scratch but i get the same result my steps are:

  1. clone the electron repository
  2. npm i mica-electron
  3. modify the main.js as I put the screenshots
  4. change the style.css putting the body and the htm with transparent background
    Captura de pantalla 2022-10-29 162059

@GregVido
Copy link
Owner

Have you done all Windows updates?

@dariomadeira
Copy link
Author

Yes, i update windows11 to last version

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants