Skip to content

Commit

Permalink
Pencil
Browse files Browse the repository at this point in the history
  • Loading branch information
thororen1234 committed Feb 5, 2025
1 parent c183e74 commit 7baf272
Showing 1 changed file with 20 additions and 5 deletions.
25 changes: 20 additions & 5 deletions src/renderer/components/settings/TraySettings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import "./traySetting.css";

import { Margins, Modals, ModalSize, openModal } from "@vencord/types/utils";
import { findByCodeLazy, findByPropsLazy } from "@vencord/types/webpack";
import { findByCodeLazy } 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";
Expand All @@ -16,7 +16,25 @@ import { isLinux } from "renderer/utils";
import { SettingsComponent } from "./Settings";

const ColorPicker = findByCodeLazy("#{intl::USER_SETTINGS_PROFILE_COLOR_SELECT_COLOR}", ".BACKGROUND_PRIMARY)");
const { PencilIcon } = findByPropsLazy("PencilIcon");

function PencilIcon(onClick) {
return (
<svg
className="vcd-edit-button"
role="img"
width="40"
height="40"
fill="none"
viewBox="0 0 24 24"
onClick={onClick}
>
<path
fill="currentColor"
d="m13.96 5.46 4.58 4.58a1 1 0 0 0 1.42 0l1.38-1.38a2 2 0 0 0 0-2.82l-3.18-3.18a2 2 0 0 0-2.82 0l-1.38 1.38a1 1 0 0 0 0 1.42ZM2.11 20.16l.73-4.22a3 3 0 0 1 .83-1.61l7.87-7.87a1 1 0 0 1 1.42 0l4.58 4.58a1 1 0 0 1 0 1.42l-7.87 7.87a3 3 0 0 1-1.6.83l-4.23.73a1.5 1.5 0 0 1-1.73-1.73Z"
/>
</svg>
);
}

const presets = [
"#3DB77F", // discord default ~
Expand Down Expand Up @@ -85,9 +103,6 @@ function trayEditButton(iconName: string) {
id={iconName}
></img>
<PencilIcon
className="vcd-edit-button"
width="40"
height="40"
onClick={async () => {
changeIcon(iconName, Settings);
}}
Expand Down

0 comments on commit 7baf272

Please sign in to comment.