From dff95eb863681b87178e3eb30d95f169353d0278 Mon Sep 17 00:00:00 2001 From: Kiril Vatev Date: Sat, 27 Apr 2024 01:09:26 -0400 Subject: [PATCH] making transparent window work --- main.js | 2 ++ renderer/Frame/Frame.css | 1 + renderer/base.css | 12 +++++++++++- 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/main.js b/main.js index 6335405..cf0eb89 100644 --- a/main.js +++ b/main.js @@ -70,6 +70,8 @@ function getLocationOnExistingScreen() { }, frame: process.platform === 'darwin' ? true : false, titleBarStyle: process.platform === 'darwin' ? 'hidden' : undefined, + transparent: true, + backgroundColor: '#000000ff', icon }; diff --git a/renderer/Frame/Frame.css b/renderer/Frame/Frame.css index fc63260..cf86793 100644 --- a/renderer/Frame/Frame.css +++ b/renderer/Frame/Frame.css @@ -2,6 +2,7 @@ -webkit-app-region: drag; height: var(--frame-height); display: flex; + background-color: var(--color-background); } .frame .frame-title { diff --git a/renderer/base.css b/renderer/base.css index 307a104..2475c4f 100644 --- a/renderer/base.css +++ b/renderer/base.css @@ -21,13 +21,23 @@ html, body { margin: 0; padding: 0; - background-color: var(--color-background); + background: transparent; color: var(--color-text); font-size: var(--font-size); font-family: var(--font-family); min-height: 100%; } +#app { + /* makes border-radius work */ + transform: translateZ(0); + border-radius: 8px; + overflow: hidden; + + /* box-shadow: inset 0 0 0 1px var(--color-background); */ + background-color: var(--color-background); +} + * { box-sizing: border-box; }