feat: add dropdown to choose vibrancy value on macOS (#1941)

Co-authored-by: V <vendicated@riseup.net>
This commit is contained in:
Damien Erambert 2023-12-06 15:30:41 -08:00 committed by GitHub
parent 6ee50d30f6
commit 34cbb22efe
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 100 additions and 9 deletions

View file

@ -85,9 +85,15 @@ if (!IS_VANILLA) {
options.backgroundColor = "#00000000";
}
if (settings.macosTranslucency && process.platform === "darwin") {
const needsVibrancy = process.platform === "darwin" || (settings.macosVibrancyStyle || settings.macosTranslucency);
if (needsVibrancy) {
options.backgroundColor = "#00000000";
options.vibrancy = "sidebar";
if (settings.macosTranslucency) {
options.vibrancy = "sidebar";
} else if (settings.macosVibrancyStyle) {
options.vibrancy = settings.macosVibrancyStyle;
}
}
process.env.DISCORD_PRELOAD = original;