Improved beat jump visuals

This commit is contained in:
patben8 committed 2026-09-25 17:00:01 +02:00
1 parent 642977e9bc
commit 394520c2cf
3 files changed
+25 -8

No files matched your search

+7 -5
View File
@@ -84,8 +84,8 @@ export function BpmReadout({
}
const T_BTN =
'flex h-8 items-center justify-center rounded-lg font-mono text-xs text-text transition-colors ' +
'hover:bg-ink-800 disabled:opacity-30 disabled:hover:bg-transparent'
'flex h-8 items-center justify-center rounded-lg font-mono text-xs text-text transition-[background-color,transform] duration-75 ' +
'hover:bg-ink-800 active:scale-[0.92] active:bg-white/[0.14] disabled:opacity-30 disabled:hover:bg-transparent disabled:active:scale-100'
/** Nudge / octave / tap / lock — always visible on the control row. */
export function TempoControls({
@@ -126,7 +126,7 @@ export function TempoControls({
const off = bpm == null
const of = flexible ? ` of marker ${markerIndex + 1}` : ''
return (
<div role="group" aria-label="Tempo" className="btn-glass flex h-10 shrink-0 items-center gap-0.5 rounded-xl px-1">
<div role="group" aria-label="Tempo" className="glass-group flex h-10 shrink-0 items-center gap-0.5 rounded-xl px-1">
<button className={`${T_BTN} w-7`} onClick={() => onNudgeBpm(-0.25)} disabled={off} title={`BPM −0.25${of}`}>−−</button>
<button className={`${T_BTN} w-[22px]`} onClick={() => onNudgeBpm(-0.01)} disabled={off} title={`BPM −0.01${of}`}>−</button>
<button className={`${T_BTN} w-[22px]`} onClick={() => onNudgeBpm(0.01)} disabled={off} title={`BPM +0.01${of}`}>+</button>
@@ -188,7 +188,9 @@ export function GridEditStrip({
}) {
const hasGrid = markerCount > 0
const flexible = markerCount > 1
const nudge = 'flex h-10 items-center px-2 font-mono text-[11px] text-text hover:bg-ink-800 disabled:opacity-30'
const nudge =
'flex h-10 items-center px-2 font-mono text-[11px] text-text transition-[background-color,transform] duration-75 ' +
'hover:bg-ink-800 active:scale-[0.92] active:bg-white/[0.14] disabled:opacity-30'
const pill = 'flex h-[34px] shrink-0 items-center gap-1.5 rounded-full px-3 text-xs disabled:opacity-35'
return (
// A container, so the three actions on the right can drop their labels
@@ -224,7 +226,7 @@ export function GridEditStrip({
</button>
</div>
<div className="btn-glass flex h-10 shrink-0 items-center overflow-hidden rounded-xl">
<div className="glass-group flex h-10 shrink-0 items-center overflow-hidden rounded-xl">
{/* Phase nudges move the GOVERNING marker — not gated on atMarker,
since the drift is heard at the playhead, not at the marker. */}
<button className={nudge} onClick={() => onNudgeMarker(-10)} disabled={!hasGrid} title="Move the marker −10 ms">−10</button>
+8 -3
View File
@@ -44,6 +44,11 @@ const LIT =
const KEY =
'flex items-center justify-center rounded-[9px] transition-[color,background-color,box-shadow,transform,filter] duration-75 ' +
'active:scale-[0.93] active:brightness-125 disabled:opacity-30 disabled:active:scale-100'
// One half of the ‹ › pair: its own hover and press, inside the shared surface.
const HALF =
'flex h-10 w-[34px] items-center justify-center text-text transition-[background-color,transform] duration-75 ' +
'hover:bg-white/[0.08] active:scale-[0.92] active:bg-white/[0.14] disabled:opacity-30 ' +
'disabled:hover:bg-transparent disabled:active:scale-100'
// An armed IN: a green rim and glow — "waiting for OUT".
const ARMED =
'bg-mint/15 text-mint shadow-[inset_0_0_0_1px_rgb(61_220_132/0.75),0_0_12px_-3px_rgb(61_220_132/0.7)]'
@@ -172,12 +177,12 @@ export function LoopControls({
</div>
)}
<div role="group" aria-label="Jump or move loop" className="btn-glass flex h-10 items-center rounded-xl">
<div role="group" aria-label="Jump or move loop" className="glass-group flex h-10 items-center rounded-xl">
<button
onClick={() => onMove(-1)}
disabled={!canMove}
title={`${what} back (←)`}
className="flex h-10 w-[34px] items-center justify-center text-text disabled:opacity-30"
className={`${HALF} rounded-l-xl`}
>
<Icon name="chevronLeft" size={15} strokeWidth={2.2} />
</button>
@@ -185,7 +190,7 @@ export function LoopControls({
onClick={() => onMove(1)}
disabled={!canMove}
title={`${what} forward (→)`}
className="flex h-10 w-[34px] items-center justify-center text-text disabled:opacity-30"
className={`${HALF} rounded-r-xl`}
>
<Icon name="chevronRight" size={15} strokeWidth={2.2} />
</button>