From 68f0f09aae6600e6db10f1399704ca0dfc3ecaf8 Mon Sep 17 00:00:00 2001
From: Psychotoxical <171614930+Psychotoxical@users.noreply.github.com>
Date: Mon, 8 Jun 2026 19:51:16 +0200
Subject: [PATCH] fix(themes): restyle the animated-theme indicator (#1035)
Replace the raw hazard-triangle icon with a small amber motion chip
(shared AnimatedThemeBadge): an Activity glyph on a tinted rounded
surface. In the Theme Store it stays inline after the name; on installed
theme cards it moves from bottom-right to top-centre, clear of the active
indicator (top-right) and the uninstall control (top-left). Tooltip and
aria-label are unchanged.
---
.../settings/AnimatedThemeBadge.tsx | 44 +++++++++++++++++++
src/components/settings/InstalledThemes.tsx | 28 ++----------
src/components/settings/ThemeStoreSection.tsx | 15 ++-----
3 files changed, 50 insertions(+), 37 deletions(-)
create mode 100644 src/components/settings/AnimatedThemeBadge.tsx
diff --git a/src/components/settings/AnimatedThemeBadge.tsx b/src/components/settings/AnimatedThemeBadge.tsx
new file mode 100644
index 00000000..fcebb8a2
--- /dev/null
+++ b/src/components/settings/AnimatedThemeBadge.tsx
@@ -0,0 +1,44 @@
+import { Activity } from 'lucide-react';
+import { useTranslation } from 'react-i18next';
+
+type Variant = 'inline' | 'overlay';
+
+/**
+ * Small amber "animated theme" chip, shown only on animation-risk setups
+ * (Nvidia/Linux or compositing off). A motion glyph rather than a hazard
+ * triangle — the CPU-usage caveat lives in the tooltip.
+ *
+ * - `inline` — sits after a theme name (Theme Store rows).
+ * - `overlay` — pinned top-centre on an installed theme's preview swatch
+ * (top-right is the active indicator, top-left the uninstall X).
+ */
+export function AnimatedThemeBadge({ variant }: { variant: Variant }) {
+ const { t } = useTranslation();
+ const overlay = variant === 'overlay';
+ return (
+
+
+
+ );
+}
diff --git a/src/components/settings/InstalledThemes.tsx b/src/components/settings/InstalledThemes.tsx
index a068bd0d..fb292772 100644
--- a/src/components/settings/InstalledThemes.tsx
+++ b/src/components/settings/InstalledThemes.tsx
@@ -1,9 +1,10 @@
-import { AlertTriangle, Check, X } from 'lucide-react';
+import { Check, X } from 'lucide-react';
import { useTranslation } from 'react-i18next';
import { useThemeStore } from '../../store/themeStore';
import { useInstalledThemesStore } from '../../store/installedThemesStore';
import { uninstallTheme } from '../../utils/themes/uninstallTheme';
import { useThemeAnimationRisk } from '../../hooks/useThemeAnimationRisk';
+import { AnimatedThemeBadge } from './AnimatedThemeBadge';
import { FIXED_THEMES } from './fixedThemes';
/** Pull a 3-band swatch (bg / card / accent) out of an installed theme's CSS. */
@@ -80,30 +81,7 @@ export function InstalledThemes() {
)}
- {animRisk && c.animated && (
-
-
-
- )}
+ {animRisk && c.animated && }
{c.label}
diff --git a/src/components/settings/ThemeStoreSection.tsx b/src/components/settings/ThemeStoreSection.tsx
index 450c6d01..550b0b67 100644
--- a/src/components/settings/ThemeStoreSection.tsx
+++ b/src/components/settings/ThemeStoreSection.tsx
@@ -1,9 +1,10 @@
import { useEffect, useMemo, useRef, useState } from 'react';
import { useTranslation } from 'react-i18next';
-import { AlertTriangle, Check, ChevronLeft, ChevronRight, Download, RefreshCw, Trash2, WifiOff } from 'lucide-react';
+import { Check, ChevronLeft, ChevronRight, Download, RefreshCw, Trash2, WifiOff } from 'lucide-react';
import { open as openUrl } from '@tauri-apps/plugin-shell';
import CoverLightbox from '../CoverLightbox';
import { useThemeAnimationRisk } from '../../hooks/useThemeAnimationRisk';
+import { AnimatedThemeBadge } from './AnimatedThemeBadge';
import { useThemeStore } from '../../store/themeStore';
import { useInstalledThemesStore, type InstalledTheme } from '../../store/installedThemesStore';
import {
@@ -295,17 +296,7 @@ export function ThemeStoreSection() {
{t('settings.themeStoreActive')}
)}
- {animRisk && th.animated && (
-
-
-
- )}
+ {animRisk && th.animated && }
{t('settings.themeStoreByAuthor', { author: th.author })}