Give the app icons, tooltips and a finished theme

There was no icon system at all. Transport buttons called
QStyle.standardIcon(SP_MediaPlay), which returns the platform theme's dark
monochrome glyph -- painted onto the app's saturated red buttons at a fixed
36px with no text, that is the black square. Everything else called an icon
was an emoji baked into en.json, which is tofu wherever the emoji font is
missing. Qt stylesheets cannot recolour a QIcon, so the colour is an argument
to the new helper; that is the whole fix.

The SVGs are drawn here rather than vendored, which keeps a third-party
licence out of the tree, and they live in the module rather than as asset
files, which keeps them out of package-data and safe in a frozen build.

Tooltips were the other half: three widgets in the entire application had one
and nothing set an accessible name. Filling that in at the call sites would
have meant editing well over a hundred of them, most in upstream-owned files.
Instead one application-level event filter handles QEvent.Polish, which Qt
sends to every widget once before it is shown -- so it also reaches dialogs
built by upstream code, and survives the next merge. It maps placeholder
emoji to icons, fills empty tooltips from the button text, and logs icon-only
buttons that still have none so the gaps are findable.

StyleSheet.MAIN styles the window, inputs, buttons and tables and nothing
else, so the main tab bar, combos, sliders, lists, menus, splitters, tooltips
and the horizontal scrollbar fell through to the platform style. EXTRA_QSS
covers them, in a fork-owned module appended at the one application site.
SmoothTabWidget names its frame "tabContent" with the comment "We draw border
on content instead" -- that rule existed only inside two dialogs, and now
exists for the main window too.

Two corrections to rules that were already there: the pressed style changed
the padding, shifting every label two pixels and clipping fixed-width icon
buttons, and checkboxes were fully rounded, which reads as a radio button
rather than an on/off toggle.

Verified by screenshot on the real display: tab bar, buttons, combo carets
and checkboxes all render as intended, and all 35 icons rasterise non-empty.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-08-09 00:58:38 +02:00
parent 5ae2817eea
commit 3aca43b372
16 changed files with 783 additions and 22 deletions
+28
View File
@@ -10,8 +10,36 @@ records.
## Unreleased
### Added
- **Real icons.** The app had no icon system: transport buttons used the
platform style's dark monochrome glyphs painted on saturated red, and
everything else called an icon was an emoji baked into the English strings.
A drawn SVG set is now rendered through QtSvg and recoloured at load — Qt
stylesheets cannot recolour a `QIcon`, which is exactly why the old ones were
unreadable. Buttons across the Downloads tab gained icons too.
- **Tooltips and accessible names on every button.** Three widgets in the whole
application had a tooltip. An application-level polish filter now fills them
in as each button is first shown, and swaps placeholder emoji for icons —
which covers dialogs owned by upstream without editing them.
### Fixed
- **The rest of the interface is themed.** `StyleSheet.MAIN` styled the window,
inputs, buttons and tables and nothing else, so the main tab bar, combo
boxes, sliders, lists, menus, splitters, tooltips and the horizontal
scrollbar were drawn by the platform — the tab bar with white text forced
onto system-coloured tabs, tooltips in the system's light style on a black
app. All of them now match. `QFrame#tabContent` finally has the rule the tab
widget's own comment promised.
- Checkboxes were round, which reads as a radio button — "one of these" rather
than "on or off". They are square with a tick.
- Clicking any button shifted its label two pixels down and right, and clipped
the artwork on fixed-width icon buttons: the pressed style changed the
padding. The background change alone reads as pressed.
- The window icon shipped only at 48px and was upscaled everywhere; the 256px
master now ships beside it. Its fallback was the platform's download arrow
standing in for the application's identity.
- **The player no longer crashes the app.** Qt destroys and recreates a
widget's OpenGL context whenever it moves to another top-level window, and
calls `initializeGL()` again. libmpv allows one render context per handle, so