Add Enable Menu setting
This commit is contained in:
parent
5fa9264bdb
commit
61f9559984
3 changed files with 10 additions and 3 deletions
|
@ -298,6 +298,10 @@ function initSettingsListeners(win: BrowserWindow) {
|
|||
win.setBackgroundColor("#ffffff");
|
||||
}
|
||||
});
|
||||
|
||||
addSettingsListener("enableMenu", enabled => {
|
||||
win.setAutoHideMenuBar(enabled ?? false);
|
||||
});
|
||||
}
|
||||
|
||||
function initSpellCheck(win: BrowserWindow) {
|
||||
|
@ -311,7 +315,7 @@ function createMainWindow() {
|
|||
removeSettingsListeners();
|
||||
removeVencordSettingsListeners();
|
||||
|
||||
const { staticTitle, transparencyOption } = Settings.store;
|
||||
const { staticTitle, transparencyOption, enableMenu } = Settings.store;
|
||||
const { frameless, macosTranslucency } = VencordSettings.store;
|
||||
const win = (mainWin = new BrowserWindow({
|
||||
show: false,
|
||||
|
@ -340,7 +344,8 @@ function createMainWindow() {
|
|||
}
|
||||
: {}),
|
||||
...(process.platform === "darwin" ? { titleBarStyle: "hiddenInset" } : {}),
|
||||
...getWindowBoundsOptions()
|
||||
...getWindowBoundsOptions(),
|
||||
autoHideMenuBar: enableMenu
|
||||
}));
|
||||
win.setMenuBarVisibility(false);
|
||||
|
||||
|
|
|
@ -40,7 +40,8 @@ export default function SettingsUi() {
|
|||
"Open Links in app (experimental)",
|
||||
"Opens links in a new Vesktop window instead of your web browser"
|
||||
],
|
||||
["staticTitle", "Static Title", 'Makes the window title "Vencord" instead of changing to the current page']
|
||||
["staticTitle", "Static Title", 'Makes the window title "Vencord" instead of changing to the current page'],
|
||||
["enableMenu", "Enable Menu Bar", "Enables the application menu bar. Press ALT to toggle visibility."]
|
||||
];
|
||||
|
||||
const switches = allSwitches.filter(isTruthy);
|
||||
|
|
1
src/shared/settings.d.ts
vendored
1
src/shared/settings.d.ts
vendored
|
@ -19,6 +19,7 @@ export interface Settings {
|
|||
minimizeToTray?: boolean;
|
||||
skippedUpdate?: string;
|
||||
staticTitle?: boolean;
|
||||
enableMenu?: boolean;
|
||||
arRPC?: boolean;
|
||||
appBadge?: boolean;
|
||||
|
||||
|
|
Loading…
Reference in a new issue