From 2a0d6cd6730a7c2f8e26db3e400ce4d5d98412a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Kr=C3=BCger?= Date: Tue, 18 Nov 2025 08:34:14 +0100 Subject: [PATCH] fix: replace hardcoded colors with theme variables in Track component MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Replaced hardcoded slate colors with theme-aware variables: Track.tsx changes: - Waveform area: bg-slate-900 → bg-waveform-bg - Effects section: bg-slate-900/50 → bg-muted/50 - Expanded effects: bg-slate-900/30 → bg-muted/70 - Canvas background: rgb(15, 23, 42) → --color-waveform-bg This ensures that: - Light theme shows proper light gray backgrounds - Dark theme shows proper dark gray backgrounds - All components respect theme colors - No more hardcoded colors that bypass the theme Now the entire UI properly responds to theme changes with the harmonized gray palettes we configured. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- components/tracks/Track.tsx | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/components/tracks/Track.tsx b/components/tracks/Track.tsx index 17cc962..497c6de 100644 --- a/components/tracks/Track.tsx +++ b/components/tracks/Track.tsx @@ -112,8 +112,9 @@ export function Track({ const width = rect.width; const height = rect.height; - // Clear canvas - ctx.fillStyle = 'rgb(15, 23, 42)'; + // Clear canvas with theme color + const bgColor = getComputedStyle(canvas).getPropertyValue('--color-waveform-bg') || 'rgb(15, 23, 42)'; + ctx.fillStyle = bgColor; ctx.fillRect(0, 0, width, height); const buffer = track.audioBuffer; @@ -396,7 +397,7 @@ export function Track({ {/* Right: Waveform Area (Flexible Width) */}
{track.audioBuffer ? ( @@ -440,7 +441,7 @@ export function Track({ {/* Bottom: Effects Section (Collapsible, Full Width) */} {!track.collapsed && ( -
+
{/* Effects Header - clickable to toggle */}
+
{track.effectChain.effects.length === 0 ? (