Open gaetandezeiraud opened 2 months ago
Same as https://github.com/GregVido/mica-electron/issues/31 I am on the version 1.5.9. It is a regression?
Hi, yes it's true, can I see all of your code to understand where the problem is?
Thank you for the answer. Nothing more, the code I quoted. And the use of MicaBrowserWindow.
import { app } from 'electron';
const { MicaBrowserWindow, IS_WINDOWS_11 } = require('mica-electron');
...
// Create the browser window.
mainWindow = new MicaBrowserWindow({
autoHideMenuBar: true,
minHeight: 500,
minWidth: 980,
width: 1070,
height: 650,
show: false,
webPreferences: {
preload: path.join(__dirname, 'preload.js'),
},
});
// Enable mica or acrylic
if (IS_WINDOWS_11) {
mainWindow.setMicaEffect();
} else {
mainWindow.setAcrylic();
}
// Dark or Light theme
const currTheme = store.get('theme', 'system');
if (currTheme == 'dark') {
mainWindow.setDarkTheme();
} else if (currTheme == 'light') {
mainWindow.setLightTheme();
} else {
mainWindow.setAutoTheme();
}
Okay, after more investigation, seems related to setAutoTheme / setDarkTheme / setLightTheme who are only for Windows 11.
Not fixed finally. The error is trigger here https://github.com/GregVido/mica-electron/blob/6c62b86bc6af04126a85b24463598c9fb1ecc095/module/app.cpp#L41
I got "Mica-Electron work only on Windows 11." when running on Windows 10. But at the same time, the Github Readme say "Mica electron is now compatible with windows 10". What is true?
I use it like so:
Thanks.