diff --git a/desktop/src/features/settings/ui/SettingsPanels.tsx b/desktop/src/features/settings/ui/SettingsPanels.tsx index 200aab20d3..a13f122960 100644 --- a/desktop/src/features/settings/ui/SettingsPanels.tsx +++ b/desktop/src/features/settings/ui/SettingsPanels.tsx @@ -1,4 +1,4 @@ -import { type ReactNode, useMemo, useState } from "react"; +import { useMemo, useState } from "react"; import { BellRing, Bot, @@ -10,9 +10,12 @@ import { LayoutTemplate, LockKeyhole, MonitorCog, + Moon, Smartphone, Smile, Stethoscope, + Sun, + SunMoon, UserRound, type LucideIcon, } from "lucide-react"; @@ -330,35 +333,6 @@ function SingleThemeTile({ ); } -function HorizontalScrollWithFade({ - children, - expanded, -}: { - children: ReactNode; - expanded: boolean; -}) { - if (expanded) { - return
{children}
; - } - - return ( -
-
- {children} -
- {/* Right fade */} - - ); -} - type AppearanceMode = "system" | "light" | "dark"; function ThemeSettingsCard() { @@ -383,7 +357,6 @@ function ThemeSettingsCard() { : "light"; const [selectedMode, setSelectedMode] = useState(activeMode); - const [expanded, setExpanded] = useState(false); const getVars = (name: SyntaxThemeName) => withAccentPreviewVars( @@ -407,7 +380,6 @@ function ThemeSettingsCard() { const handleModeSelect = (mode: AppearanceMode) => { setSelectedMode(mode); - setExpanded(false); }; const handleSelectTheme = (name: SyntaxThemeName) => { @@ -436,18 +408,18 @@ function ThemeSettingsCard() { /> {/* Mode selector: System / Light / Dark */} -
+
{( [ - { mode: "system" as const, label: "System" }, - { mode: "light" as const, label: "Light" }, - { mode: "dark" as const, label: "Dark" }, + { mode: "system" as const, label: "System", Icon: SunMoon }, + { mode: "light" as const, label: "Light", Icon: Sun }, + { mode: "dark" as const, label: "Dark", Icon: Moon }, ] as const - ).map(({ mode, label }) => ( + ).map(({ mode, label, Icon }) => ( ))}
- {/* Theme list based on selected mode */} + {/* Theme grid based on selected mode */}
-
-

Themes

- {((selectedMode === "system" && pairedLight.length > 4) || - (selectedMode === "light" && allLightThemes.length > 4) || - (selectedMode === "dark" && allDarkThemes.length > 4)) && ( - - )} -
- - +
{selectedMode === "system" && pairedLight.map((lightName) => { const darkName = getThemePair(lightName); @@ -538,7 +473,7 @@ function ThemeSettingsCard() { vars={getVars(name)} /> ))} - +
{/* Accent color picker */} diff --git a/desktop/src/shared/theme/ThemePreviewFrame.tsx b/desktop/src/shared/theme/ThemePreviewFrame.tsx index 7379495a34..05e9748856 100644 --- a/desktop/src/shared/theme/ThemePreviewFrame.tsx +++ b/desktop/src/shared/theme/ThemePreviewFrame.tsx @@ -233,12 +233,12 @@ function SystemPreferencePreviewSvg({ viewBox="0 0 118 80" xmlns="http://www.w3.org/2000/svg" > - {/* Dark half (top) */} - - - + {/* Light half (top) */} + + + - {/* Light half (bottom) — clipped to bottom portion */} - + {/* Dark half (bottom) — clipped to bottom portion */} + - - + + - + - +