Make rounded corners and shadow customizable (#1281)
Co-authored-by: V <vendicated@riseup.net>
This commit is contained in:
+12
-2
@@ -312,8 +312,16 @@ function getWindowBoundsOptions(): BrowserWindowConstructorOptions {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function buildBrowserWindowOptions(): BrowserWindowConstructorOptions {
|
function buildBrowserWindowOptions(): BrowserWindowConstructorOptions {
|
||||||
const { staticTitle, transparencyOption, enableMenu, customTitleBar, splashTheming, splashBackground } =
|
const {
|
||||||
Settings.store;
|
staticTitle,
|
||||||
|
transparencyOption,
|
||||||
|
enableMenu,
|
||||||
|
enableShadow,
|
||||||
|
enableRoundedCorners,
|
||||||
|
customTitleBar,
|
||||||
|
splashTheming,
|
||||||
|
splashBackground
|
||||||
|
} = Settings.store;
|
||||||
|
|
||||||
const { frameless, transparent, macosVibrancyStyle } = VencordSettings.store;
|
const { frameless, transparent, macosVibrancyStyle } = VencordSettings.store;
|
||||||
|
|
||||||
@@ -336,6 +344,8 @@ function buildBrowserWindowOptions(): BrowserWindowConstructorOptions {
|
|||||||
},
|
},
|
||||||
frame: !noFrame,
|
frame: !noFrame,
|
||||||
autoHideMenuBar: enableMenu,
|
autoHideMenuBar: enableMenu,
|
||||||
|
hasShadow: enableShadow !== false,
|
||||||
|
roundedCorners: enableRoundedCorners !== false,
|
||||||
...getWindowBoundsOptions()
|
...getWindowBoundsOptions()
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -74,6 +74,20 @@ const SettingsOptions: Record<string, Array<BooleanSetting | SettingsComponent>>
|
|||||||
defaultValue: false,
|
defaultValue: false,
|
||||||
disabled: () => Settings.store.customTitleBar ?? isWindows
|
disabled: () => Settings.store.customTitleBar ?? isWindows
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
key: "enableShadow",
|
||||||
|
title: "Enable Window Shadow",
|
||||||
|
description: "Enables the window shadow. Requires a full restart.",
|
||||||
|
defaultValue: true,
|
||||||
|
disabled: () => Settings.store.customTitleBar !== true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: "enableRoundedCorners",
|
||||||
|
title: "Enable Rounded Corners",
|
||||||
|
description: "Enables rounded corners. Requires a full restart.",
|
||||||
|
defaultValue: true,
|
||||||
|
disabled: () => Settings.store.customTitleBar !== true
|
||||||
|
},
|
||||||
{
|
{
|
||||||
key: "enableSplashScreen",
|
key: "enableSplashScreen",
|
||||||
title: "Enable Splash Screen",
|
title: "Enable Splash Screen",
|
||||||
|
|||||||
Vendored
+2
@@ -20,6 +20,8 @@ export interface Settings {
|
|||||||
openLinksWithElectron?: boolean;
|
openLinksWithElectron?: boolean;
|
||||||
staticTitle?: boolean;
|
staticTitle?: boolean;
|
||||||
enableMenu?: boolean;
|
enableMenu?: boolean;
|
||||||
|
enableShadow?: boolean;
|
||||||
|
enableRoundedCorners?: boolean;
|
||||||
disableSmoothScroll?: boolean;
|
disableSmoothScroll?: boolean;
|
||||||
hardwareAcceleration?: boolean;
|
hardwareAcceleration?: boolean;
|
||||||
hardwareVideoAcceleration?: boolean;
|
hardwareVideoAcceleration?: boolean;
|
||||||
|
|||||||
Reference in New Issue
Block a user