mirror of
https://github.com/narrrl/proton-stream.git
synced 2026-11-04 16:57:00 +01:00
feat(app): turn on AccessKit, and name the controls drawn as icons
eframe now builds with its accesskit feature, so the widget tree reaches the platform screen reader. Buttons drawn as an icon glyph were read as the icon font's private code point, and the hand-painted ones (play, poster tiles, the watched mark, download rings, the seek bar) as nothing. A Named trait gives them a name, and hint() makes the existing hover text that name.
This commit is contained in:
1 parent
d43da778b6
commit
31bdd75559
12 files changed
+401
-26
No files matched your search
@@ -8,6 +8,7 @@ use crate::app::{Action, Page};
|
||||
use crate::engine::{DownloadItem, DownloadKey, DownloadState};
|
||||
use crate::playback::PlaybackTarget;
|
||||
use crate::theme;
|
||||
use crate::ui::widgets::Named;
|
||||
use crate::ui::{self, Art, Card};
|
||||
|
||||
pub struct OfflineView<'a> {
|
||||
@@ -878,6 +879,7 @@ pub(crate) fn still(
|
||||
actions: &mut Vec<Action>,
|
||||
) {
|
||||
let (rect, response) = ui.allocate_exact_size(size, egui::Sense::click());
|
||||
let response = response.named(format!("Play {}", episode.label()));
|
||||
if !ui.is_rect_visible(rect) {
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user