v0.11.0: web mixes pick their own color
The export dialog gains an accent color — the hover background on links and
tracklist rows, and the player's progress fill — and the rest of the bar loses
its 2010 gold so that choice is the only color in it.
The accent travels as a `:root { --accent }` custom property declared in
index.html, which player.css reads as `var(--accent, #8c764a)`. That keeps the
stylesheet in the verbatim copyfile loop: index.html is still the only rendered
template. `normalize_accent` is the injection gate — the value lands raw inside
a <style> block and string.Template escapes nothing — and `contrast_text` flips
the hover text black or white, since the old page hard-coded white and a pale
accent made it unreadable.
The bar itself is now fixed light gray with black text. Its sprite glyphs are
pale lavender and yellow, drawn for the dark gold bar, so they're recolored
with `filter: brightness(0)` rather than by editing the GIF — which still ships
byte-identical, spinner and all.
Not persisted: the picker opens on #8c764a every time, so an export nobody
touches looks exactly like the mixes already online.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JBSM2bFC6UToiEg8BE4dqj
This commit is contained in:
@@ -1,5 +1,46 @@
|
||||
## Done
|
||||
|
||||
### Round 41 (2026-08-22) — Web mixes pick their own color (v0.11.0)
|
||||
|
||||
Every exported mix came out in the same 2010 gold-and-brown skin: a `#c7b563`
|
||||
player bar, `#ccc` progress fill, and a hard-coded `#8c764a` behind every hover.
|
||||
Now the hover backgrounds and the progress fill are one color the user picks in
|
||||
the export dialog, and the rest of the bar is deliberately colorless so that
|
||||
choice is the only color in it.
|
||||
|
||||
- [x] **One accent, chosen per export.** A swatch button in `WebMixDialog`
|
||||
opening `QColorDialog`, plus Reset. Deliberately *not* persisted — it
|
||||
opens on `exporter.DEFAULT_ACCENT` (`#8c764a`) every time, so an export
|
||||
nobody touches still looks exactly like the mixes already online.
|
||||
`exporter.normalize_accent` is the injection gate, not a nicety: the value
|
||||
is substituted raw into the page's `<style>` block and `string.Template`
|
||||
escapes nothing, so anything that isn't `#rgb`/`#rrggbb` falls back to the
|
||||
default.
|
||||
- [x] **Delivered as a CSS custom property**, `:root { --accent }` declared in
|
||||
`index.html`, which `player.css` reads as `var(--accent, #8c764a)`. That is
|
||||
what lets the stylesheet stay in the verbatim `shutil.copyfile` loop —
|
||||
`index.html` is still the only thing rendered.
|
||||
- [x] **Hover text flips black or white** against the accent
|
||||
(`exporter.contrast_text`, the same luminance rule `theme.apply_theme`
|
||||
uses). The old page hard-coded white, which vanished the moment anyone
|
||||
picked a pale color.
|
||||
- [x] **The player bar is fixed light gray with black text**: `#eee` behind the
|
||||
transport, `#000` for both elapsed and duration, a gray buffered segment,
|
||||
and a dark box-shadow in place of the near-white one that was invisible on
|
||||
the white page it always sat on.
|
||||
- [x] **Black glyphs without touching the GIF.** The sprite's play/pause are
|
||||
pale lavender and the spinner is yellow — drawn for the dark gold bar and
|
||||
invisible on light gray. `filter: brightness(0)` zeroes every channel and
|
||||
leaves alpha alone, so they paint solid black and the loading frame still
|
||||
animates. `player-graphics.gif` still ships byte-identical.
|
||||
- [x] `theme.swatch_icon()` — `preferences_dialog`'s private `_swatch` promoted
|
||||
so the export dialog isn't a second copy of it.
|
||||
|
||||
Verified in Chrome against two generated mixes: a dark teal (`#0f8a7e`) accent
|
||||
gives white hover text, a pale yellow (`#f2e96b`) gives black, and both paint
|
||||
the progress fill while the bar around it stays gray with a visible black
|
||||
play/pause.
|
||||
|
||||
### Round 39 (2026-08-20) — Playlist merges stop losing your track order (v0.9.1)
|
||||
|
||||
The playlist half of the Round 36 rework, and what actually scrambled
|
||||
|
||||
Reference in New Issue
Block a user