Fix tempo slider dragging and width

This commit is contained in:
Ninosaurier committed 2026-11-17 15:45:02 +01:00
1 parent 8ef90b5898
commit ec2792736d
2 files changed
+72 -23

No files matched your search

+65 -18
View File
@@ -41,6 +41,7 @@
--accent: #ff8a3d;
--accent-hover: #ff9b5c;
--accent-pressed: #e07936;
--tempo-control-width: 94px;
--primary-rgb: 244, 241, 237;
--accent-rgb: 255, 138, 61;
--mono: 'DM Mono', monospace;
@@ -1040,6 +1041,8 @@ ion-popover.instrument-picker-popover {
}
.tempo-trigger {
width: var(--tempo-control-width);
flex: 0 0 var(--tempo-control-width);
--color: var(--ink);
--background: var(--surface-raised);
--background-hover: #33323b;
@@ -1096,6 +1099,7 @@ ion-popover.instrument-picker-popover {
}
.tempo-value {
align-self: center;
color: var(--ink);
font-size: 12px;
font-weight: 600;
@@ -1105,7 +1109,7 @@ ion-popover.instrument-picker-popover {
/* Popover contents */
.tempo-popover {
--width: 94px;
--width: var(--tempo-control-width);
--height: 226px;
--background: var(--surface);
--backdrop-opacity: 0;
@@ -1125,29 +1129,72 @@ ion-popover.instrument-picker-popover {
.tempo-range-track {
position: relative;
width: 28px;
width: 44px;
height: 164px;
flex: 0 0 164px;
}
.tempo-range {
position: absolute;
top: 50%;
left: 50%;
width: 164px;
height: 28px;
width: 44px;
height: 164px;
margin: 0;
transform: translate(-50%, -50%) rotate(-90deg);
--bar-background: #58537d;
--bar-background-active: var(--accent);
--bar-height: 3px;
--height: 28px;
--knob-background: var(--accent);
--knob-size: 12px;
--padding-top: 2px;
--padding-bottom: 2px;
--padding-start: 2px;
--padding-end: 2px;
padding: 0;
border: 0;
appearance: none;
-webkit-appearance: none;
writing-mode: vertical-lr;
direction: rtl;
background: transparent;
touch-action: none;
}
.tempo-range::-webkit-slider-runnable-track {
width: 3px;
height: 100%;
border-radius: 999px;
background: linear-gradient(
to top,
var(--accent) 0%,
var(--accent) var(--tempo-progress),
#58537d var(--tempo-progress),
#58537d 100%
);
}
.tempo-range::-webkit-slider-thumb {
width: 18px;
height: 18px;
margin-top: 0;
border: 0;
border-radius: 50%;
-webkit-appearance: none;
background: var(--accent);
box-shadow: 0 0 0 2px rgba(var(--accent-rgb), 0.18);
}
.tempo-range::-moz-range-track {
width: 3px;
border-radius: 999px;
background: #58537d;
}
.tempo-range::-moz-range-progress {
border-radius: 999px;
background: var(--accent);
}
.tempo-range::-moz-range-thumb {
width: 18px;
height: 18px;
border: 0;
border-radius: 50%;
background: var(--accent);
box-shadow: 0 0 0 2px rgba(var(--accent-rgb), 0.18);
}
.tempo-range:focus-visible {
outline: 2px solid var(--accent);
outline-offset: 4px;
}
.meter-popover {