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
@@ -11,9 +11,10 @@ use pstr_core::prefs::PlaybackPrefs;
|
||||
use pstr_player::LANGUAGES;
|
||||
|
||||
use crate::app::Action;
|
||||
use crate::desktop_prefs::{CACHE_CHOICES, DesktopPrefs};
|
||||
use crate::desktop_prefs::{CACHE_CHOICES, DesktopPrefs, TEXT_SIZE_CHOICES};
|
||||
use crate::theme;
|
||||
use crate::ui;
|
||||
use crate::ui::widgets::Named;
|
||||
|
||||
/// The settings that are a single value rather than a form.
|
||||
///
|
||||
@@ -79,6 +80,7 @@ fn appearance_form(ui: &mut egui::Ui, appearance: Appearance, actions: &mut Vec<
|
||||
ui.horizontal_wrapped(|ui| {
|
||||
for flavor in Flavor::ALL {
|
||||
if palette_card(ui, appearance, flavor)
|
||||
.named(flavor.label())
|
||||
.on_hover_text(flavor.description())
|
||||
.clicked()
|
||||
&& appearance.flavor != flavor
|
||||
@@ -269,7 +271,7 @@ fn swatch(ui: &mut egui::Ui, appearance: Appearance, accent: Accent) -> egui::Re
|
||||
}
|
||||
}
|
||||
response
|
||||
.on_hover_text(accent.label())
|
||||
.hint(accent.label())
|
||||
.on_hover_cursor(egui::CursorIcon::PointingHand)
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user