macOS transparency
This commit is contained in:
parent
dd879b46c5
commit
231936c0c7
4 changed files with 26 additions and 4 deletions
|
@ -91,9 +91,9 @@ 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",
|
||||
titleBarStyle: 'hidden',
|
||||
|
@ -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;
|
||||
|
|
|
@ -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() {
|
||||
|
|
17
src/renderer/less/macos.less
Normal file
17
src/renderer/less/macos.less
Normal file
|
@ -0,0 +1,17 @@
|
|||
body[platform="darwin"] {
|
||||
html {
|
||||
background: transparent!important;
|
||||
}
|
||||
|
||||
&.notransparency::before {
|
||||
display: none;
|
||||
}
|
||||
#app {
|
||||
&.simplebg {
|
||||
background: transparent;
|
||||
}
|
||||
&::before {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -3110,5 +3110,6 @@ body[platform='darwin'] {
|
|||
}
|
||||
|
||||
|
||||
@import url("less/macos.less");
|
||||
@import url("less/linux.less");
|
||||
@import url("less/compact.less");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue