feat: implement translucency for macOS (#4)
Co-authored-by: Vendicated <vendicated@riseup.net>
This commit is contained in:
parent
07d647ba2e
commit
af42af070e
1 changed files with 16 additions and 0 deletions
|
@ -232,6 +232,16 @@ function initSettingsListeners(win: BrowserWindow) {
|
|||
});
|
||||
}
|
||||
});
|
||||
|
||||
VencordSettings.addChangeListener("macosTranslucency", enabled => {
|
||||
if (enabled) {
|
||||
win.setVibrancy("sidebar");
|
||||
win.setBackgroundColor("#ffffff00");
|
||||
} else {
|
||||
win.setVibrancy(null);
|
||||
win.setBackgroundColor("#ffffff");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
export function createMainWindow() {
|
||||
|
@ -247,6 +257,12 @@ export function createMainWindow() {
|
|||
},
|
||||
icon: ICON_PATH,
|
||||
frame: VencordSettings.store.frameless !== true,
|
||||
...(VencordSettings.store.macosTranslucency
|
||||
? {
|
||||
vibrancy: "sidebar",
|
||||
backgroundColor: "#ffffff00"
|
||||
}
|
||||
: {}),
|
||||
...getWindowBoundsOptions()
|
||||
}));
|
||||
|
||||
|
|
Loading…
Reference in a new issue