feat(settings): Add the ability to make the window transparent (#457)
This commit is contained in:
parent
6e22a96d9e
commit
072ad3d7e6
@ -32,6 +32,7 @@ export interface Settings {
|
|||||||
enableReactDevtools: boolean;
|
enableReactDevtools: boolean;
|
||||||
themeLinks: string[];
|
themeLinks: string[];
|
||||||
frameless: boolean;
|
frameless: boolean;
|
||||||
|
transparent: boolean;
|
||||||
winCtrlQ: boolean;
|
winCtrlQ: boolean;
|
||||||
plugins: {
|
plugins: {
|
||||||
[plugin: string]: {
|
[plugin: string]: {
|
||||||
@ -48,6 +49,7 @@ const DefaultSettings: Settings = {
|
|||||||
themeLinks: [],
|
themeLinks: [],
|
||||||
enableReactDevtools: false,
|
enableReactDevtools: false,
|
||||||
frameless: false,
|
frameless: false,
|
||||||
|
transparent: false,
|
||||||
winCtrlQ: false,
|
winCtrlQ: false,
|
||||||
plugins: {}
|
plugins: {}
|
||||||
};
|
};
|
||||||
|
@ -108,6 +108,13 @@ function VencordSettings() {
|
|||||||
>
|
>
|
||||||
Disable the window frame
|
Disable the window frame
|
||||||
</Switch>
|
</Switch>
|
||||||
|
<Switch
|
||||||
|
value={settings.transparent}
|
||||||
|
onChange={(v: boolean) => settings.transparent = v}
|
||||||
|
note="Requires a full restart"
|
||||||
|
>
|
||||||
|
Enable window transparency
|
||||||
|
</Switch>
|
||||||
{navigator.platform.toLowerCase().startsWith("win") && (
|
{navigator.platform.toLowerCase().startsWith("win") && (
|
||||||
<Switch
|
<Switch
|
||||||
value={settings.winCtrlQ}
|
value={settings.winCtrlQ}
|
||||||
|
@ -80,6 +80,10 @@ if (!process.argv.includes("--vanilla")) {
|
|||||||
if (settings.frameless) {
|
if (settings.frameless) {
|
||||||
options.frame = false;
|
options.frame = false;
|
||||||
}
|
}
|
||||||
|
if (settings.transparent) {
|
||||||
|
options.transparent = true;
|
||||||
|
options.backgroundColor = "#00000000";
|
||||||
|
}
|
||||||
|
|
||||||
process.env.DISCORD_PRELOAD = original;
|
process.env.DISCORD_PRELOAD = original;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user