Skip to content

Commit

Permalink
Background transparency #238
Browse files Browse the repository at this point in the history
  • Loading branch information
Levminer committed Dec 4, 2024
1 parent ac7a60a commit d05f92c
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 11 deletions.
6 changes: 5 additions & 1 deletion core/tauri.conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,11 @@
"visible": false,
"theme": "Dark",
"contentProtected": true,
"useHttpsScheme": true
"useHttpsScheme": true,
"transparent": true,
"windowEffects": {
"effects": ["mica"]
}
}
],
"security": {
Expand Down
14 changes: 7 additions & 7 deletions interface/layout/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,20 +25,20 @@ export default app

// Set background color if vibrancy not supported
const setBackground = async () => {
const system = os.type().toString()
const system = os.type()
const build = os.version().toString()

if (system === "Windows_NT" && build < "10.0.22000") {
document.querySelector("body").style.background = "black"
if (system !== "windows") {
document.querySelector("body").style.background = "#0a0a0a"
}

if (system === "Linux") {
document.querySelector("body").style.background = "black"
if (system === "windows" && build < "10.0.22000") {
document.querySelector("body").style.background = "#0a0a0a"
}
}

// TODO transparency
// setBackground()
// transparency
setBackground()

// Tray navigate to codes handler
event.listen("openCodes", (data: any) => {
Expand Down
6 changes: 3 additions & 3 deletions interface/styles/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ html {

/* code element */
.code {
@apply transparent-800 w-full flex-grow rounded-xl p-4 small:w-1/3 max-w-2xl;
@apply transparent-800 w-full max-w-2xl flex-grow rounded-xl p-4 small:w-1/3;
}

.dialog {
Expand Down Expand Up @@ -71,8 +71,8 @@ body {
display: flex;
flex-direction: column;
min-height: 100vh;
background-color: rgb(10, 10, 10);
/* background: url("../../images/mica.png"); */
/* background-color: rgb(10, 10, 10); */
background: transparent;
line-height: normal;
font-family: system-ui, Arial;
user-select: none;
Expand Down

0 comments on commit d05f92c

Please sign in to comment.