Reworked deck UI

This commit is contained in:
patben8 committed 2026-09-25 16:17:06 +02:00
1 parent 0a9764ee89
commit 46d3978580
11 files changed
+915 -741

No files matched your search

+5 -1
View File
@@ -255,6 +255,8 @@ export function drawBeatgrid(
h: number,
dpr: number,
activeMarker: number,
/** Grid mode: the grid is what is being edited, so it is drawn brighter. */
emphasize = false,
): void {
if (endSec <= startSec) return
const span = endSec - startSec
@@ -295,7 +297,9 @@ export function drawBeatgrid(
// Translucent white with no outline: the grid should read as a ruler laid
// over the waveform, not bars cut through it. Downbeats are clearly
// brighter, which is what grid editing needs to see.
ctx.fillStyle = downbeat ? 'rgba(255,255,255,0.62)' : 'rgba(255,255,255,0.26)'
ctx.fillStyle = downbeat
? `rgba(255,255,255,${emphasize ? 0.9 : 0.62})`
: `rgba(255,255,255,${emphasize ? 0.5 : 0.26})`
ctx.fillRect(x - Math.floor(lw / 2), 0, lw, h)
}
}
+1
View File
@@ -85,6 +85,7 @@ const PATHS = {
),
pencil: <path d="M4 20h4L19 9l-4-4L4 16zM13.5 6.5l4 4" strokeLinejoin="round" />,
plus: <path d="M12 5v14M5 12h14" />,
grid: <path d="M5 3v18M10 3v18M15 3v18M20 3v18" />,
} as const
export type IconName = keyof typeof PATHS