macOS transparency

This commit is contained in:
booploops 2022-02-17 22:45:59 -08:00
parent dd879b46c5
commit 231936c0c7
4 changed files with 26 additions and 4 deletions

View file

@ -91,11 +91,11 @@ export class BrowserWindow {
minHeight: 390,
frame: false,
title: "Cider",
vibrancy: "fullscreen-ui",
vibrancy: "dark",
transparent: process.platform === "darwin",
hasShadow: false,
hasShadow: true,
show: false,
//backgroundColor: "#1E1E1E",
// backgroundColor: "#1E1E1E",
titleBarStyle: 'hidden',
trafficLightPosition: {x: 15, y: 20},
webPreferences: {
@ -130,8 +130,12 @@ export class BrowserWindow {
switch(process.platform) {
default:
break;
case "win32":
this.options.backgroundColor = "#1E1E1E";
break;
case "linux":
this.options.backgroundColor = "#1E1E1E";
this.options.autoHideMenuBar = true
this.options.frame = true
break;

View file

@ -452,7 +452,7 @@ const app = new Vue({
history.forward()
},
getHTMLStyle() {
document.querySelector("html").style.background = "#222";
// document.querySelector("html").style.background = "#222";
document.querySelector("body").classList.add("notransparency")
},
resetState() {

View file

@ -0,0 +1,17 @@
body[platform="darwin"] {
html {
background: transparent!important;
}
&.notransparency::before {
display: none;
}
#app {
&.simplebg {
background: transparent;
}
&::before {
display: none;
}
}
}

View file

@ -3110,5 +3110,6 @@ body[platform='darwin'] {
}
@import url("less/macos.less");
@import url("less/linux.less");
@import url("less/compact.less");