fix acyrlic

This commit is contained in:
vapormusic 2022-01-07 09:29:28 +07:00
parent c51d82271e
commit cba4a71b87
2 changed files with 8 additions and 2 deletions

View file

@ -133,6 +133,7 @@ if (process.platform === "linux") {
app.commandLine.appendSwitch('high-dpi-support', "1")
app.commandLine.appendSwitch('force-device-scale-factor', "1")
app.commandLine.appendSwitch('disable-pinch');
app.commandLine.appendSwitch('no-sandbox');
// app.commandLine.appendSwitch('js-flags', '--max-old-space-size=1024')
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

View file

@ -71,11 +71,16 @@ const CiderBase = {
if (process.platform === "darwin" || process.platform === "linux") {
win = new BrowserWindow(options)
} else {
// i don't know why but we have to do this for acrylic to work properly
if (app.cfg.get("visual.window_transparency") !== "disabled") {
const { BrowserWindow } = require("electron-acrylic-window");
win = new BrowserWindow(options)
win.setVibrancy("dark")
} else {
win = new BrowserWindow(options)
win.setVibrancy("dark")
}
win = new BrowserWindow(options)
win.setVibrancy("dark")
}
// intercept "https://js-cdn.music.apple.com/hls.js/2.141.0/hls.js/hls.js" and redirect to local file "./apple-hls.js" instead