aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Vencord.ts9
-rw-r--r--src/api/settings.ts2
-rw-r--r--src/components/VencordSettings/VencordTab.tsx8
-rw-r--r--src/patcher.ts3
4 files changed, 20 insertions, 2 deletions
diff --git a/src/Vencord.ts b/src/Vencord.ts
index ac8579b..ba7d01f 100644
--- a/src/Vencord.ts
+++ b/src/Vencord.ts
@@ -95,3 +95,12 @@ async function init() {
}
init();
+
+if (!IS_WEB && Settings.winNativeTitleBar && navigator.platform.toLowerCase().startsWith("win")) {
+ document.addEventListener("DOMContentLoaded", () => {
+ document.head.append(Object.assign(document.createElement("style"), {
+ id: "vencord-native-titlebar-style",
+ textContent: "[class*=titleBar-]{display: none!important}"
+ }));
+ }, { once: true });
+}
diff --git a/src/api/settings.ts b/src/api/settings.ts
index c711791..d05afcd 100644
--- a/src/api/settings.ts
+++ b/src/api/settings.ts
@@ -34,6 +34,7 @@ export interface Settings {
frameless: boolean;
transparent: boolean;
winCtrlQ: boolean;
+ winNativeTitleBar: boolean;
plugins: {
[plugin: string]: {
enabled: boolean;
@@ -57,6 +58,7 @@ const DefaultSettings: Settings = {
frameless: false,
transparent: false,
winCtrlQ: false,
+ winNativeTitleBar: false,
plugins: {},
notifications: {
diff --git a/src/components/VencordSettings/VencordTab.tsx b/src/components/VencordSettings/VencordTab.tsx
index 9880872..5ac120d 100644
--- a/src/components/VencordSettings/VencordTab.tsx
+++ b/src/components/VencordSettings/VencordTab.tsx
@@ -63,11 +63,15 @@ function VencordSettings() {
title: "Enable React Developer Tools",
note: "Requires a full restart"
},
- !IS_WEB && !isWindows && {
+ !IS_WEB && (!isWindows ? {
key: "frameless",
title: "Disable the window frame",
note: "Requires a full restart"
- },
+ } : {
+ key: "winNativeTitleBar",
+ title: "Use Windows' native title bar instead of Discord's custom one",
+ note: "Requires a full restart"
+ }),
!IS_WEB && {
key: "transparent",
title: "Enable window transparency",
diff --git a/src/patcher.ts b/src/patcher.ts
index d51405d..9752a04 100644
--- a/src/patcher.ts
+++ b/src/patcher.ts
@@ -79,7 +79,10 @@ if (!process.argv.includes("--vanilla")) {
options.webPreferences.sandbox = false;
if (settings.frameless) {
options.frame = false;
+ } else if (process.platform === "win32" && settings.winNativeTitleBar) {
+ delete options.frame;
}
+
if (settings.transparent) {
options.transparent = true;
options.backgroundColor = "#00000000";