Skip to content

Commit

Permalink
Restrict system accent
Browse files Browse the repository at this point in the history
  • Loading branch information
thororen1234 committed Oct 21, 2024
1 parent ea25f8f commit 60989d2
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/renderer/components/settings/TraySettings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import { findByCodeLazy, findByPropsLazy } from "@vencord/types/webpack";
import { Button, Forms, Select, Switch, Toasts } from "@vencord/types/webpack/common";
import { setCurrentTrayIcon } from "renderer/patches/tray";
import { useSettings } from "renderer/settings";
import { isLinux } from "renderer/utils";

import { SettingsComponent } from "./Settings";

Expand Down Expand Up @@ -188,6 +189,11 @@ export const CustomizeTraySwitch: SettingsComponent = ({ settings }) => {

export const TrayColorTypeSelect: SettingsComponent = ({ settings }) => {
if (!settings.tray) return null;
const options = [{ label: "Default", value: "default", default: true }];
// @ts-expect-error I couldn't figure it out ref mainwindow L547-549
if (!isLinux) options.push({ label: "System Accent", value: "system" });
// @ts-expect-error I wanted the old sorting
options.push({ label: "Custom", value: "custom" });
return (
<div className="vcd-tray-settings">
<div className="vcd-tray-settings-labels">
Expand All @@ -196,11 +202,7 @@ export const TrayColorTypeSelect: SettingsComponent = ({ settings }) => {

<Select
placeholder="Default"
options={[
{ label: "Default", value: "default", default: true },
{ label: "System Accent", value: "system" },
{ label: "Custom", value: "custom" }
]}
options={options}
closeOnSelect={true}
select={v => {
settings.trayColorType = v;
Expand Down

0 comments on commit 60989d2

Please sign in to comment.