fix: replace hardcoded colors with theme variables in Track component
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 <noreply@anthropic.com>
This commit is contained in:
@@ -112,8 +112,9 @@ export function Track({
|
|||||||
const width = rect.width;
|
const width = rect.width;
|
||||||
const height = rect.height;
|
const height = rect.height;
|
||||||
|
|
||||||
// Clear canvas
|
// Clear canvas with theme color
|
||||||
ctx.fillStyle = 'rgb(15, 23, 42)';
|
const bgColor = getComputedStyle(canvas).getPropertyValue('--color-waveform-bg') || 'rgb(15, 23, 42)';
|
||||||
|
ctx.fillStyle = bgColor;
|
||||||
ctx.fillRect(0, 0, width, height);
|
ctx.fillRect(0, 0, width, height);
|
||||||
|
|
||||||
const buffer = track.audioBuffer;
|
const buffer = track.audioBuffer;
|
||||||
@@ -396,7 +397,7 @@ export function Track({
|
|||||||
|
|
||||||
{/* Right: Waveform Area (Flexible Width) */}
|
{/* Right: Waveform Area (Flexible Width) */}
|
||||||
<div
|
<div
|
||||||
className="flex-1 relative bg-slate-900 border-b border-border cursor-pointer"
|
className="flex-1 relative bg-waveform-bg border-b border-border cursor-pointer"
|
||||||
onClick={onSelect}
|
onClick={onSelect}
|
||||||
>
|
>
|
||||||
{track.audioBuffer ? (
|
{track.audioBuffer ? (
|
||||||
@@ -440,7 +441,7 @@ export function Track({
|
|||||||
|
|
||||||
{/* Bottom: Effects Section (Collapsible, Full Width) */}
|
{/* Bottom: Effects Section (Collapsible, Full Width) */}
|
||||||
{!track.collapsed && (
|
{!track.collapsed && (
|
||||||
<div className="bg-slate-900/50 border-b border-border/50">
|
<div className="bg-muted/50 border-b border-border/50">
|
||||||
{/* Effects Header - clickable to toggle */}
|
{/* Effects Header - clickable to toggle */}
|
||||||
<div
|
<div
|
||||||
className="flex items-center gap-2 px-3 py-1.5 cursor-pointer hover:bg-accent/30 transition-colors"
|
className="flex items-center gap-2 px-3 py-1.5 cursor-pointer hover:bg-accent/30 transition-colors"
|
||||||
@@ -491,7 +492,7 @@ export function Track({
|
|||||||
|
|
||||||
{/* Horizontal scrolling device rack - expanded state */}
|
{/* Horizontal scrolling device rack - expanded state */}
|
||||||
{showEffects && (
|
{showEffects && (
|
||||||
<div className="overflow-x-auto custom-scrollbar px-3 py-3 bg-slate-900/30">
|
<div className="overflow-x-auto custom-scrollbar px-3 py-3 bg-muted/70">
|
||||||
<div className="flex gap-2">
|
<div className="flex gap-2">
|
||||||
{track.effectChain.effects.length === 0 ? (
|
{track.effectChain.effects.length === 0 ? (
|
||||||
<div className="text-xs text-muted-foreground text-center py-8 w-full">
|
<div className="text-xs text-muted-foreground text-center py-8 w-full">
|
||||||
|
|||||||
Reference in New Issue
Block a user