fix: smaller volume handle, click-to-jump already works
This commit is contained in:
@@ -547,7 +547,7 @@
|
|||||||
<!-- Volume bar fill (clamped to 1.0 for display) -->
|
<!-- 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'} />
|
<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 -->
|
<!-- 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 -->
|
<!-- Volume % label -->
|
||||||
<text x={nd.x + 8} y={nd.y + nd.height - 15} font-size="7" font-family="monospace" fill="#888">
|
<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)}%
|
{Math.round(Math.max(0, Math.min(1, nd.volume)) * 100)}%
|
||||||
@@ -799,5 +799,5 @@
|
|||||||
.vol-bg { pointer-events: none; }
|
.vol-bg { pointer-events: none; }
|
||||||
.vol-bar { pointer-events: none; }
|
.vol-bar { pointer-events: none; }
|
||||||
.vol-handle { cursor: ew-resize; }
|
.vol-handle { cursor: ew-resize; }
|
||||||
.vol-handle:hover { filter: brightness(1.3); r: 6; }
|
.vol-handle:hover { filter: brightness(1.3); }
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Reference in New Issue
Block a user