fix: smaller volume handle, click-to-jump already works

This commit is contained in:
joren
2026-03-29 23:33:15 +02:00
parent 044c5e551c
commit 0b50400f69

View File

@@ -547,7 +547,7 @@
<!-- Volume bar fill (clamped to 1.0 for display) -->
<rect class="vol-bar" x={nd.x + 8} y={nd.y + nd.height - 12} width={(nd.width - 36) * Math.max(0, Math.min(1, nd.volume))} height="4" rx="2" fill={nd.mute ? '#666' : '#4a9'} />
<!-- Volume handle circle -->
<circle class="vol-handle" cx={nd.x + 8 + (nd.width - 36) * Math.max(0, Math.min(1, nd.volume))} cy={nd.y + nd.height - 10} r="5" fill={nd.mute ? '#888' : '#6cb'} stroke="#fff" stroke-width="1" />
<circle class="vol-handle" cx={nd.x + 8 + (nd.width - 36) * Math.max(0, Math.min(1, nd.volume))} cy={nd.y + nd.height - 10} r="3.5" fill={nd.mute ? '#888' : '#6cb'} stroke="#fff" stroke-width="1" />
<!-- Volume % label -->
<text x={nd.x + 8} y={nd.y + nd.height - 15} font-size="7" font-family="monospace" fill="#888">
{Math.round(Math.max(0, Math.min(1, nd.volume)) * 100)}%
@@ -799,5 +799,5 @@
.vol-bg { pointer-events: none; }
.vol-bar { pointer-events: none; }
.vol-handle { cursor: ew-resize; }
.vol-handle:hover { filter: brightness(1.3); r: 6; }
.vol-handle:hover { filter: brightness(1.3); }
</style>