aed2d54b45
- Wheel zoom around the cursor on both curve plots and the spectrogram: Ctrl zooms time only, Shift values only, scrolling over an axis zooms that axis; drag pans live; double-click resets. The zoom window survives redraws, overlay changes and resizes, and resets when units change. - Guide and reference lines are painted in a uPlot draw hook, so a dragged reference line (now with a triangle handle and label) follows the cursor instead of jumping on release. Per-track integrated lines take the track's colour when overlaid. - In-plot legend like pyqtgraph's: a swatch per track plus LRA / max dBTP. - Metadata shows integrated loudness, LRA and max true peak (prefetched first) instead of debug rows; the file list shows each track's LUFS. - UI, canvas and axis text prefer M PLUS 1 Code, else the system font. - Spectrogram image is cached offscreen so panning is cheap; its tick labels adapt to the zoom level. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015UXA39Sh9coAx4FhRkd8R2
301 lines
8.8 KiB
CSS
301 lines
8.8 KiB
CSS
/* Audio Mastering Analysis Toolkit — web front end.
|
|
Dark by default: a spectrogram is read against its surroundings, and the
|
|
desktop app's pythonic defaults are what these numbers were tuned against. */
|
|
|
|
:root {
|
|
--bg: #12141a;
|
|
--panel: #191c24;
|
|
--panel-2: #1f232d;
|
|
--line: #2b303c;
|
|
--text: #e8eaf0;
|
|
--muted: #939aa8;
|
|
--accent: #4fc3f7;
|
|
--accent-dim: #2b7fa3;
|
|
--warn: #ffb74d;
|
|
--error: #ef5350;
|
|
--ok: #81c784;
|
|
--radius: 6px;
|
|
/* M PLUS 1 Code (the desktop app's font) where installed, else the system UI font. */
|
|
--font: "M PLUS 1 Code", system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif;
|
|
--mono: "M PLUS 1 Code", ui-monospace, "Cascadia Mono", "Source Code Pro", Menlo, Consolas, monospace;
|
|
}
|
|
|
|
* { box-sizing: border-box; }
|
|
|
|
/* The UA's [hidden] { display: none } loses to any class that sets display
|
|
(e.g. .drop-overlay's flex), which left the overlay permanently covering the
|
|
page. Make the attribute win everywhere. */
|
|
[hidden] { display: none !important; }
|
|
|
|
html, body {
|
|
margin: 0;
|
|
height: 100%;
|
|
background: var(--bg);
|
|
color: var(--text);
|
|
font: 13px/1.45 var(--font);
|
|
overflow: hidden;
|
|
}
|
|
|
|
/* ---- top bar ---- */
|
|
|
|
.topbar {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
gap: 16px;
|
|
height: 48px;
|
|
padding: 0 14px;
|
|
background: var(--panel);
|
|
border-bottom: 1px solid var(--line);
|
|
}
|
|
|
|
.brand { display: flex; align-items: baseline; gap: 8px; }
|
|
.logo { color: var(--accent); font-size: 16px; }
|
|
.brand-name { font-weight: 600; letter-spacing: .2px; }
|
|
.brand-sub {
|
|
font-size: 10px;
|
|
text-transform: uppercase;
|
|
letter-spacing: 1px;
|
|
color: var(--bg);
|
|
background: var(--accent-dim);
|
|
border-radius: 3px;
|
|
padding: 1px 5px;
|
|
}
|
|
|
|
.topbar-controls { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
|
|
|
|
.field { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12px; }
|
|
|
|
select, .btn, .toggle {
|
|
background: var(--panel-2);
|
|
color: var(--text);
|
|
border: 1px solid var(--line);
|
|
border-radius: var(--radius);
|
|
padding: 5px 9px;
|
|
font: inherit;
|
|
font-size: 12px;
|
|
cursor: pointer;
|
|
}
|
|
select:hover, .btn:hover, .toggle:hover { border-color: var(--accent-dim); }
|
|
select:focus-visible, .btn:focus-visible, .toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
|
|
|
|
.btn.primary { background: var(--accent-dim); border-color: var(--accent); color: #eaf7ff; }
|
|
.btn.primary:hover { background: var(--accent); color: #06202b; }
|
|
.btn.small { padding: 3px 7px; font-size: 11px; }
|
|
.btn:disabled, .toggle:disabled { opacity: .45; cursor: not-allowed; }
|
|
|
|
.toggle.on { border-color: var(--accent); color: var(--accent); }
|
|
.toggle.off { color: var(--muted); }
|
|
|
|
.separator { width: 1px; height: 22px; background: var(--line); }
|
|
|
|
/* ---- layout ---- */
|
|
|
|
.layout {
|
|
display: grid;
|
|
grid-template-columns: 288px minmax(0, 1fr);
|
|
height: calc(100% - 48px);
|
|
}
|
|
|
|
.sidebar {
|
|
background: var(--panel);
|
|
border-right: 1px solid var(--line);
|
|
overflow-y: auto;
|
|
padding: 12px;
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 12px;
|
|
}
|
|
|
|
.panel {
|
|
background: var(--panel-2);
|
|
border: 1px solid var(--line);
|
|
border-radius: var(--radius);
|
|
padding: 10px;
|
|
}
|
|
.panel h2 {
|
|
margin: 0 0 8px;
|
|
font-size: 11px;
|
|
text-transform: uppercase;
|
|
letter-spacing: .8px;
|
|
color: var(--muted);
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 6px;
|
|
}
|
|
.badge {
|
|
background: var(--line);
|
|
color: var(--text);
|
|
border-radius: 8px;
|
|
padding: 0 6px;
|
|
font-size: 10px;
|
|
font-variant-numeric: tabular-nums;
|
|
}
|
|
|
|
/* ---- file list ---- */
|
|
|
|
.file-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
|
|
.file-row {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 7px;
|
|
padding: 5px 6px;
|
|
border-radius: 4px;
|
|
cursor: pointer;
|
|
border: 1px solid transparent;
|
|
}
|
|
.file-row:hover { background: #252a35; }
|
|
.file-row.selected { background: #232a38; border-color: var(--accent-dim); }
|
|
.file-row input[type=checkbox] { margin: 0; accent-color: var(--accent-dim); flex: none; }
|
|
.file-swatch { width: 9px; height: 9px; border-radius: 2px; flex: none; }
|
|
.file-name {
|
|
flex: 1;
|
|
min-width: 0;
|
|
white-space: nowrap;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
font-size: 12px;
|
|
}
|
|
.file-lufs { flex: none; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
|
|
.file-remove {
|
|
flex: none;
|
|
border: 0;
|
|
background: none;
|
|
color: var(--muted);
|
|
cursor: pointer;
|
|
font-size: 14px;
|
|
line-height: 1;
|
|
padding: 0 2px;
|
|
opacity: 0;
|
|
}
|
|
.file-row:hover .file-remove { opacity: 1; }
|
|
.file-remove:hover { color: var(--error); }
|
|
|
|
.empty, .hint { color: var(--muted); font-size: 11.5px; margin: 4px 0 0; }
|
|
.hint code { background: #000; padding: 0 3px; border-radius: 3px; }
|
|
|
|
/* ---- metadata ---- */
|
|
|
|
.metadata { display: grid; grid-template-columns: auto 1fr; gap: 3px 10px; margin: 0; font-size: 12px; }
|
|
.metadata dt { color: var(--muted); }
|
|
.metadata dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
|
|
.metadata dd.muted { color: var(--muted); }
|
|
.metadata .group { margin-top: 7px; }
|
|
.metadata dd.strong { font-weight: 600; }
|
|
|
|
/* ---- reference lines ---- */
|
|
|
|
.ref-list { list-style: none; margin: 0 0 8px; padding: 0; display: flex; flex-direction: column; gap: 3px; }
|
|
.ref-row { display: flex; align-items: center; gap: 6px; font-size: 12px; }
|
|
.ref-row input[type=color] { width: 20px; height: 18px; padding: 0; border: 1px solid var(--line); background: none; }
|
|
.ref-row input[type=text] { width: 62px; }
|
|
.ref-row input[type=number] { width: 62px; }
|
|
.ref-row input { background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: 4px; padding: 2px 4px; font: inherit; font-size: 11px; }
|
|
.ref-row .ref-remove { border: 0; background: none; color: var(--muted); cursor: pointer; }
|
|
.ref-row .ref-remove:hover { color: var(--error); }
|
|
.ref-actions { display: flex; gap: 6px; }
|
|
|
|
/* ---- plot stage ---- */
|
|
|
|
.stage { display: flex; flex-direction: column; min-width: 0; padding: 10px 12px 0; }
|
|
|
|
.plot-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 24px; }
|
|
.plot-head h1 { margin: 0; font-size: 13px; font-weight: 600; color: var(--text); }
|
|
.plot-hint { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
|
|
|
.plot-host {
|
|
position: relative;
|
|
flex: 1;
|
|
min-height: 200px;
|
|
margin-top: 6px;
|
|
background: #0d0f14;
|
|
border: 1px solid var(--line);
|
|
border-radius: var(--radius);
|
|
overflow: hidden;
|
|
}
|
|
.plot-host .uplot { position: absolute; inset: 0; width: 100% !important; height: 100% !important; }
|
|
.plot-host canvas.heatmap { position: absolute; inset: 0; width: 100%; height: 100%; }
|
|
|
|
/* In-plot legend, like pyqtgraph's: swatches per track plus scalar readouts.
|
|
pointer-events: none so zoom and pan work straight through it. */
|
|
.plot-legend {
|
|
position: absolute;
|
|
z-index: 5;
|
|
pointer-events: none;
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 2px;
|
|
max-width: 46%;
|
|
padding: 6px 9px;
|
|
background: rgba(13, 15, 20, .82);
|
|
border: 1px solid var(--line);
|
|
border-radius: 4px;
|
|
font-size: 11.5px;
|
|
}
|
|
.plot-legend .entry { display: flex; align-items: center; gap: 7px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
|
.plot-legend .swatch { width: 14px; height: 3px; border-radius: 1px; flex: none; }
|
|
.plot-legend .note { color: var(--muted); padding-left: 21px; font-variant-numeric: tabular-nums; }
|
|
|
|
body.dragging-pan, body.dragging-pan * { cursor: grabbing !important; user-select: none; }
|
|
body.dragging-ref, body.dragging-ref * { cursor: ns-resize !important; user-select: none; }
|
|
|
|
.placeholder {
|
|
position: absolute;
|
|
inset: 0;
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
justify-content: center;
|
|
text-align: center;
|
|
color: var(--muted);
|
|
gap: 6px;
|
|
padding: 20px;
|
|
}
|
|
.ph-title { font-size: 15px; color: var(--text); margin: 0; }
|
|
.ph-body { margin: 0; max-width: 44ch; font-size: 12px; }
|
|
.ph-body code { background: #000; padding: 0 3px; border-radius: 3px; }
|
|
|
|
.statusbar {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
gap: 12px;
|
|
padding: 6px 2px;
|
|
font-size: 11.5px;
|
|
color: var(--muted);
|
|
min-height: 24px;
|
|
}
|
|
.status.working { color: var(--accent); }
|
|
.status.error { color: var(--error); }
|
|
.status.warn { color: var(--warn); }
|
|
.timing { font-family: var(--mono); }
|
|
|
|
/* ---- drag & drop ---- */
|
|
|
|
.drop-overlay {
|
|
position: fixed;
|
|
inset: 0;
|
|
background: rgba(10, 20, 30, .82);
|
|
border: 3px dashed var(--accent);
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
font-size: 20px;
|
|
color: var(--accent);
|
|
z-index: 40;
|
|
}
|
|
|
|
/* ---- tooltip ---- */
|
|
|
|
.tooltip {
|
|
position: fixed;
|
|
background: #05070b;
|
|
border: 1px solid var(--line);
|
|
border-radius: 4px;
|
|
padding: 5px 7px;
|
|
font: 11px/1.4 var(--mono);
|
|
color: var(--text);
|
|
pointer-events: none;
|
|
z-index: 30;
|
|
white-space: nowrap;
|
|
}
|