-
-
Notifications
You must be signed in to change notification settings - Fork 206
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Title bar option improvements + native title bar option for mac #854
base: main
Are you sure you want to change the base?
Changes from all commits
aa11933
bdd99bd
dbd489b
7592f0b
ffa6d93
180097c
6f75c86
4aca4ee
7b99d93
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,6 +14,7 @@ import { isMac, isWindows } from "renderer/utils"; | |
import { AutoStartToggle } from "./AutoStartToggle"; | ||
import { DiscordBranchPicker } from "./DiscordBranchPicker"; | ||
import { NotificationBadgeToggle } from "./NotificationBadgeToggle"; | ||
import { TitleBarPicker } from "./TitleBarPicker"; | ||
import { VencordLocationPicker } from "./VencordLocationPicker"; | ||
import { WindowsTransparencyControls } from "./WindowsTransparencyControls"; | ||
|
||
|
@@ -39,13 +40,8 @@ const SettingsOptions: Record<string, Array<BooleanSetting | SettingsComponent>> | |
defaultValue: true | ||
} | ||
], | ||
"User Interface": [ | ||
{ | ||
key: "customTitleBar", | ||
title: "Discord Titlebar", | ||
description: "Use Discord's custom title bar instead of the native system one. Requires a full restart.", | ||
defaultValue: isWindows | ||
}, | ||
"Title Bar": [ | ||
TitleBarPicker, | ||
{ | ||
key: "staticTitle", | ||
title: "Static Title", | ||
|
@@ -57,8 +53,11 @@ const SettingsOptions: Record<string, Array<BooleanSetting | SettingsComponent>> | |
title: "Enable Menu Bar", | ||
description: "Enables the application menu bar. Press ALT to toggle visibility.", | ||
defaultValue: false, | ||
disabled: () => Settings.store.customTitleBar ?? isWindows | ||
}, | ||
invisible: () => isMac, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. how come? |
||
disabled: () => Settings.store.titleBar === "custom" || isWindows | ||
} | ||
], | ||
"User Interface": [ | ||
{ | ||
key: "splashTheming", | ||
title: "Splash theming", | ||
|
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -0,0 +1,36 @@ | ||||||
/* | ||||||
* SPDX-License-Identifier: GPL-3.0 | ||||||
* Vesktop, a desktop app aiming to give you a snappier Discord Experience | ||||||
* Copyright (c) 2023 Vendicated and Vencord contributors | ||||||
*/ | ||||||
|
||||||
import { Margins } from "@vencord/types/utils"; | ||||||
import { Forms, Select } from "@vencord/types/webpack/common"; | ||||||
import { isMac, isWindows } from "renderer/utils"; | ||||||
|
||||||
import { SettingsComponent } from "./Settings"; | ||||||
|
||||||
export const TitleBarPicker: SettingsComponent = ({ settings }) => { | ||||||
return ( | ||||||
<> | ||||||
<Forms.FormText className={Margins.bottom8}> | ||||||
Customize apps title bar. Pick Discord if you want to use Discord's custom title bar. Requires a full | ||||||
restart | ||||||
</Forms.FormText> | ||||||
Comment on lines
+16
to
+19
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. i don't think this should be necessary if you just label the options better |
||||||
|
||||||
<Select | ||||||
placeholder="Hidden" | ||||||
options={[ | ||||||
...(isMac ? [{ label: "Hidden", value: "hidden", default: isMac }] : []), | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. i think this is what this setting means?
Suggested change
|
||||||
{ label: "Native", value: "shown" }, | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
{ label: "Discord", value: "custom", default: isWindows } | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
]} | ||||||
closeOnSelect={true} | ||||||
select={v => (settings.titleBar = v)} | ||||||
isSelected={v => v === settings.titleBar} | ||||||
serialize={s => s} | ||||||
/> | ||||||
<Forms.FormDivider className={Margins.top16 + " " + Margins.bottom16} /> | ||||||
</> | ||||||
); | ||||||
}; |
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -20,7 +20,7 @@ export interface Settings { | |||||
appBadge?: boolean; | ||||||
disableMinSize?: boolean; | ||||||
clickTrayToShowHide?: boolean; | ||||||
customTitleBar?: boolean; | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. when changing settings names, old settings should be migrated to the new key so users won't have their choice reset. you will likely have to do this in the main process so it applies immediately |
||||||
titleBar?: "hidden" | "shown" | "custom"; | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. the values are kinda misleading
Suggested change
|
||||||
|
||||||
splashTheming?: boolean; | ||||||
splashColor?: string; | ||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
getDarwinOptions() is responsible for more than just the titlebar so this will break various features