From d274e3af179538ca59a9611fb905db021c6f78c5 Mon Sep 17 00:00:00 2001 From: NimBold Date: Thu, 2 Jul 2026 15:13:01 +0330 Subject: [PATCH] fix(settings): honor look and feel controls --- src/App.tsx | 24 ++++--- src/components/SettingsView.tsx | 44 +++++++++--- src/index.css | 117 +++++++++++++++++++++++--------- 3 files changed, 134 insertions(+), 51 deletions(-) diff --git a/src/App.tsx b/src/App.tsx index 55d7a41..3f0499c 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -512,17 +512,21 @@ function App() { // Remove all theme classes first root.classList.remove('theme-dark', 'theme-light', 'theme-dracula', 'theme-nord', 'dark'); - if (theme === 'system') { - const systemDark = window.matchMedia('(prefers-color-scheme: dark)').matches; - root.classList.add(systemDark ? 'theme-dark' : 'theme-light'); - if (systemDark) root.classList.add('dark'); - } else { - root.classList.add(`theme-${theme}`); - if (['dark', 'dracula', 'nord'].includes(theme)) { - root.classList.add('dark'); - } + if (theme === 'system') { + const systemDark = window.matchMedia('(prefers-color-scheme: dark)').matches; + root.classList.add(systemDark ? 'theme-dark' : 'theme-light'); + root.dataset.resolvedTheme = systemDark ? 'dark' : 'light'; + root.style.colorScheme = systemDark ? 'dark' : 'light'; + if (systemDark) root.classList.add('dark'); + } else { + root.classList.add(`theme-${theme}`); + if (['dark', 'dracula', 'nord'].includes(theme)) { + root.classList.add('dark'); } - }; + root.dataset.resolvedTheme = ['dark', 'dracula', 'nord'].includes(theme) ? 'dark' : 'light'; + root.style.colorScheme = ['dark', 'dracula', 'nord'].includes(theme) ? 'dark' : 'light'; + } + }; applyTheme(); diff --git a/src/components/SettingsView.tsx b/src/components/SettingsView.tsx index dd23694..3906406 100644 --- a/src/components/SettingsView.tsx +++ b/src/components/SettingsView.tsx @@ -178,6 +178,28 @@ export default function SettingsView() { const settings = useSettingsStore(); const activeTab = settings.activeSettingsTab; const platform = usePlatformInfo(); + const platformName = + platform.os === 'macos' + ? 'macOS' + : platform.os === 'windows' + ? 'Windows' + : platform.os === 'linux' + ? 'Linux' + : 'this OS'; + const trayIconLabel = + platform.os === 'macos' + ? 'Show menu bar icon' + : platform.os === 'linux' + ? 'Show status indicator icon' + : 'Show system tray icon'; + const trayIconDescription = + platform.os === 'macos' + ? 'Provides quick access from the macOS menu bar.' + : platform.os === 'windows' + ? 'Provides quick access from the Windows notification area.' + : platform.os === 'linux' + ? 'Provides quick access from the desktop tray or status area when available.' + : 'Provides quick access from the OS tray area when available.'; // Local state for engine status const [engineStatus, setEngineStatus] = useState(null); @@ -606,13 +628,16 @@ runEngineChecks(false); ))} -

Select a color palette for the app's user interface.

+

System follows the current {platformName} light or dark appearance.

Display

- Font Size +
+ Font size + Scales the download list and compact controls. +
- List Row Density +
+ List density + Changes row height, spacing, and progress bar scale. +
-

- {platform.os === 'macos' ? 'macOS Integration' : 'Desktop Integration'} -

+

OS Integration

{platform.os === 'macos' && (