From 0db6fa8f906f0564ec4ab450d5b86b773fd00496 Mon Sep 17 00:00:00 2001
From: Flag <38012125+Yumiro@users.noreply.github.com>
Date: Wed, 5 Jul 2023 22:58:57 +0100
Subject: [PATCH] feat: implement transparency for Windows
---
src/main/mainWindow.ts | 7 ++++++
src/renderer/components/Settings.tsx | 33 +++++++++++++++++++++++++++-
src/shared/settings.d.ts | 2 ++
3 files changed, 41 insertions(+), 1 deletion(-)
diff --git a/src/main/mainWindow.ts b/src/main/mainWindow.ts
index 4e115a1..92bbd32 100644
--- a/src/main/mainWindow.ts
+++ b/src/main/mainWindow.ts
@@ -262,6 +262,13 @@ function createMainWindow() {
},
icon: ICON_PATH,
frame: VencordSettings.store.frameless !== true,
+ ...(Settings.store.transparent
+ ? {
+ backgroundColor: "#00000000",
+ backgroundMaterial: Settings.store.transparencyOption,
+ transparent: true
+ }
+ : {}),
...(Settings.store.staticTitle ? { title: "Vencord" } : {}),
...(VencordSettings.store.macosTranslucency
? {
diff --git a/src/renderer/components/Settings.tsx b/src/renderer/components/Settings.tsx
index bf915b0..4880a6d 100644
--- a/src/renderer/components/Settings.tsx
+++ b/src/renderer/components/Settings.tsx
@@ -10,6 +10,7 @@ import { Margins } from "@vencord/types/utils";
import { Button, Forms, Select, Switch, Text, useState } from "@vencord/types/webpack/common";
import { setBadge } from "renderer/appBadge";
import { useSettings } from "renderer/settings";
+import { isWindows } from "renderer/utils";
export default function SettingsUi() {
const Settings = useSettings();
@@ -46,7 +47,7 @@ export default function SettingsUi() {
Vencord Desktop Settings
- Discord Branch
+ Discord Branch