fix macOS vibrancy support not working
This commit is contained in:
@@ -312,7 +312,7 @@ function buildBrowserWindowOptions(): BrowserWindowConstructorOptions {
|
|||||||
const { staticTitle, transparencyOption, enableMenu, customTitleBar, splashTheming, splashBackground } =
|
const { staticTitle, transparencyOption, enableMenu, customTitleBar, splashTheming, splashBackground } =
|
||||||
Settings.store;
|
Settings.store;
|
||||||
|
|
||||||
const { frameless, transparent, macosTranslucency } = VencordSettings.store;
|
const { frameless, transparent, macosVibrancyStyle } = VencordSettings.store;
|
||||||
|
|
||||||
const noFrame = frameless === true || customTitleBar === true;
|
const noFrame = frameless === true || customTitleBar === true;
|
||||||
const backgroundColor =
|
const backgroundColor =
|
||||||
@@ -358,9 +358,9 @@ function buildBrowserWindowOptions(): BrowserWindowConstructorOptions {
|
|||||||
options.titleBarStyle = "hidden";
|
options.titleBarStyle = "hidden";
|
||||||
options.trafficLightPosition = { x: 10, y: 10 };
|
options.trafficLightPosition = { x: 10, y: 10 };
|
||||||
|
|
||||||
if (macosTranslucency) {
|
if (macosVibrancyStyle) {
|
||||||
options.vibrancy = "sidebar";
|
options.vibrancy = macosVibrancyStyle;
|
||||||
options.backgroundColor = "#ffffff00";
|
options.backgroundColor = "#00000000";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
import { type Settings as TVencordSettings } from "@vencord/types/Vencord";
|
||||||
import { mkdirSync, readFileSync, writeFileSync } from "fs";
|
import { mkdirSync, readFileSync, writeFileSync } from "fs";
|
||||||
import { dirname, join } from "path";
|
import { dirname, join } from "path";
|
||||||
import type { Settings as TSettings, State as TState } from "shared/settings";
|
import type { Settings as TSettings, State as TState } from "shared/settings";
|
||||||
@@ -39,5 +40,5 @@ function loadSettings<T extends object = any>(file: string, name: string) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export const Settings = loadSettings<TSettings>(SETTINGS_FILE, "Vesktop settings");
|
export const Settings = loadSettings<TSettings>(SETTINGS_FILE, "Vesktop settings");
|
||||||
export const VencordSettings = loadSettings<any>(VENCORD_SETTINGS_FILE, "Vencord settings");
|
export const VencordSettings = loadSettings<TVencordSettings>(VENCORD_SETTINGS_FILE, "Vencord settings");
|
||||||
export const State = loadSettings<TState>(STATE_FILE, "Vesktop state");
|
export const State = loadSettings<TState>(STATE_FILE, "Vesktop state");
|
||||||
|
|||||||
Reference in New Issue
Block a user