From 401bab8886c41d4435d780531532df8c39d65e00 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Kr=C3=BCger?= Date: Tue, 18 Nov 2025 06:56:38 +0100 Subject: [PATCH] refactor: move solo/mute to header as icon buttons and fix waveform height MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Changes: - Solo and Mute buttons now appear as icon buttons in the track header (next to trash) - Removed redundant solo/mute button row from the expanded controls - Cleaner, more compact layout - Canvas now uses parent container's size for proper full-height rendering - Added track.height to canvas effect dependencies 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- components/tracks/Track.tsx | 67 ++++++++++++++++++------------------- 1 file changed, 33 insertions(+), 34 deletions(-) diff --git a/components/tracks/Track.tsx b/components/tracks/Track.tsx index 7cce716..9f0b7db 100644 --- a/components/tracks/Track.tsx +++ b/components/tracks/Track.tsx @@ -84,8 +84,12 @@ export function Track({ const ctx = canvas.getContext('2d'); if (!ctx) return; + // Use parent container's size since canvas is absolute positioned + const parent = canvas.parentElement; + if (!parent) return; + const dpr = window.devicePixelRatio || 1; - const rect = canvas.getBoundingClientRect(); + const rect = parent.getBoundingClientRect(); canvas.width = rect.width * dpr; canvas.height = rect.height * dpr; @@ -147,7 +151,7 @@ export function Track({ ctx.lineTo(playheadX, height); ctx.stroke(); } - }, [track.audioBuffer, track.color, track.collapsed, zoom, currentTime, duration]); + }, [track.audioBuffer, track.color, track.collapsed, track.height, zoom, currentTime, duration]); const handleCanvasClick = (e: React.MouseEvent) => { if (!onSeek || !duration) return; @@ -216,6 +220,33 @@ export function Track({ )} + {/* Solo Button */} + + + {/* Mute Button */} + + + {/* Remove Button */} - - )}