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:
@@ -651,14 +651,25 @@
|
||||
"queue": "Queue",
|
||||
"play": "Play",
|
||||
"pause": "Pause",
|
||||
"stream_stalled": "Stream failed to start after several attempts - YouTube may be throttling. Try again or pick a lower quality."
|
||||
"stream_stalled": "Stream failed to start after several attempts - YouTube may be throttling. Try again or pick a lower quality.",
|
||||
"play_pause": "Play / pause (Space)",
|
||||
"fullscreen": "Fullscreen (F)",
|
||||
"seek_tooltip": "Seek through the video",
|
||||
"quality_tooltip": "Maximum playback resolution",
|
||||
"speed_tooltip": "Playback speed",
|
||||
"volume_tooltip": "Volume",
|
||||
"subtitles_tooltip": "Toggle subtitles (C)"
|
||||
},
|
||||
"cards": {
|
||||
"play": "▶ Play",
|
||||
"queue": "+ Queue",
|
||||
"download": "⬇",
|
||||
"load_more": "Load more",
|
||||
"empty": "Nothing here yet"
|
||||
"empty": "Nothing here yet",
|
||||
"play_tooltip": "Play this video now",
|
||||
"queue_tooltip": "Add to the play queue",
|
||||
"download_tooltip": "Open in Downloads with this video ready to analyse",
|
||||
"load_more_tooltip": "Load the next page of results"
|
||||
},
|
||||
"main_tabs": {
|
||||
"watch": "Watch",
|
||||
@@ -672,7 +683,8 @@
|
||||
"button": "Search",
|
||||
"searching": "Searching...",
|
||||
"results_count": "{count} results",
|
||||
"failed": "Search failed: {error}"
|
||||
"failed": "Search failed: {error}",
|
||||
"button_tooltip": "Search YouTube"
|
||||
},
|
||||
"watch": {
|
||||
"clear_queue": "Clear queue"
|
||||
@@ -690,7 +702,12 @@
|
||||
"loading": "Loading...",
|
||||
"entry_count": "{count} videos",
|
||||
"failed": "Failed to load: {error}",
|
||||
"hint": "Open a channel (youtube.com/@name) or playlist URL, or navigate here from Search."
|
||||
"hint": "Open a channel (youtube.com/@name) or playlist URL, or navigate here from Search.",
|
||||
"open_tooltip": "Open this channel or playlist",
|
||||
"subscribe_tooltip": "Follow this channel so its uploads appear in your Feed",
|
||||
"unsubscribe_tooltip": "Stop following this channel",
|
||||
"play_all_tooltip": "Queue everything loaded here",
|
||||
"download_playlist_tooltip": "Open this playlist in Downloads"
|
||||
},
|
||||
"feed": {
|
||||
"mode_local": "Local subscriptions",
|
||||
@@ -705,6 +722,8 @@
|
||||
"account_failed": "Account feed failed (are cookies valid?): {error}",
|
||||
"subscribed": "Subscribed to {title}",
|
||||
"unsubscribed": "Unsubscribed from {title}",
|
||||
"open_channel": "Open channel"
|
||||
"open_channel": "Open channel",
|
||||
"refresh_tooltip": "Fetch the latest uploads from every subscribed channel",
|
||||
"mode_tooltip": "Where the feed comes from: your local subscriptions, or your signed-in YouTube account"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user