misterdownloadmanager: The ultimate open-source, clean-room download manager written from scratch in pure Rust for Windows, Mac, and Linux
Rust bittorrent-clientdebriddownload-acceleratordownload-managerdownloadmanagereguifile-downloadergallery-dlidmidm-alternativeinternet-download-managerm3u8-downloadermagnetplaylist-downloaderreal-debridrusttorrent-clientvideo-downloaderyoutube-downloaderyt-dlp
Screen readers reach every row of a list, not only those in view (#111) (#147)
Ahmed Nefzaoui8474f5635784
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 5ff4b775..036787c5 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -320,6 +320,11 @@ Each release's notes on GitHub come from its section here (`## [X.Y.Z]`, see### Fixed+- **Screen readers reach every row of a list, not only those in view**+ ([#111](https://github.com/anefzaoui/misterdownloadmanager/issues/111)): a list's rows out of+ view (the last qualities of Download video, a long playlist, the downloads) are there too,+ named, with their place ("12 of 40"), and can be scrolled into view or selected. A list of+ thousands offers 300 rows around the view, so it stays as fast.- **Less memory in the notification area, also after Minimize**([#72](https://github.com/anefzaoui/misterdownloadmanager/issues/72)): a window minimized to thenotification area (on by default) now gives its memory back too, as a closed one did; and bothdiff --git a/ROADMAP.md b/ROADMAP.mdindex 09669097..07b77b59 100644--- a/ROADMAP.md+++ b/ROADMAP.md@@ -13,6 +13,8 @@ Everything below ships together, in one release.### Done+- ✅ Screen readers reach every row of a list, in view or not (300 around the view in long lists)+ ([#111](https://github.com/anefzaoui/misterdownloadmanager/issues/111))- ✅ Less memory in the notification area after Minimize too, and again 2 minutes after hiding([#72](https://github.com/anefzaoui/misterdownloadmanager/issues/72))- ✅ Windows: draw with Direct3D 12 instead of OpenGL (**View → Draw with**), an option for now;diff --git a/crates/app/src/langpick.rs b/crates/app/src/langpick.rsindex 38c803fa..04456c8a 100644--- a/crates/app/src/langpick.rs+++ b/crates/app/src/langpick.rs@@ -233,11 +233,67 @@ impl Picker {None,);let count = rows.len();+ // A row's "of M" is read from its list.+ ui.ctx()+ .accesskit_node_builder(list_resp.id, |n| n.set_size_of_set(count));let rows_ui = ui.new_child(egui::UiBuilder::new().max_rect(shown_list).accessibility_parent(list_resp.id),);+ // Read as its name (and its English name), selected or not (#95: the rows were+ // blank to screen readers), with its place in the list.+ let expose_row = |resp: &egui::Response, name: &str, english: &str, on, k| {+ let spoken = if english.is_empty() {+ name.to_owned()+ } else {+ format!("{name}, {english}")+ };+ winui::expose(resp, egui::Role::ListBoxOption, &spoken, true, None);+ resp.ctx.accesskit_node_builder(resp.id, |n| {+ n.set_selected(on);+ // AccessKit counts from 0 (the platforms say k + 1).+ n.set_position_in_set(k);+ n.set_size_of_set(count);+ n.add_action(egui::accesskit::Action::ScrollIntoView);+ });+ };+ // The rows out of view are the list's too (#111), named and in their place:+ // made above and below the view, clipped to nothing (no pointer reaches them). A+ // screen reader's Select (a click) or Scroll into view brings one into view.+ let mut out_of_view = ui.new_child(+ egui::UiBuilder::new()+ .max_rect(shown_list)+ .accessibility_parent(list_resp.id),+ );+ out_of_view.set_clip_rect(Rect::NOTHING);+ let in_view = first.min(count)..(first + page as usize + 1).min(count);+ let mut bring = None;+ let mut hidden_row = |k: usize, entry: Entry, selected: &mut Entry| {+ let y = list.top() + 1.0 + (k as f32 - first as f32) * ROW;+ let row =+ Rect::from_min_max(pos2(list.left() + 1.0, y), pos2(inner_right, y + ROW));+ let resp = out_of_view.interact(+ winui::rect(row),+ egui::Id::unique(("language-row", k)),+ winui::pointer_only(),+ );+ let scroll = egui::accesskit::Action::ScrollIntoView;+ if resp.clicked() {+ *selected = entry;+ bring = Some(k);+ } else if resp+ .ctx+ .input(|i| i.has_accesskit_action_request(resp.id, scroll))+ {+ bring = Some(k);+ }+ let (name, english) = row_names(entry);+ expose_row(&resp, &name, &english, *selected == entry, k);+ };+ for (k, entry) in rows.iter().enumerate().take(in_view.start) {+ hidden_row(k, *entry, &mut self.selected);+ }for (k, entry) in rows.iter().enumerate().skip(first).take(page as usize + 1) {let y = list.top() + 1.0 + (k - first) as f32 * ROW;let row =@@ -281,30 +337,7 @@ impl Picker {egui::Image::from_bytes(format!("bytes://flag-{}.svg", i.code), i.flag).paint_at(ui, winui::rect(flag));}- let (name, english) = match (entry, &info) {- (None, Some(i)) => (- crate::i18n::fmt(- crate::i18n::t("Windows' language ({language})"),- &[("language", i.native)],- ),- String::new(),- ),- (None, None) => (- crate::i18n::t("Windows' language").to_owned(),- String::new(),- ),- // Each name in its own direction: العربية right to left, English left to- // right, in any interface.- (Some(_), Some(i)) => (- crate::i18n::isolate(i.native),- if i.english == i.native {- String::new()- } else {- crate::i18n::ltr(i.english)- },- ),- (Some(c), None) => ((*c).to_owned(), String::new()),- };+ let (name, english) = row_names(*entry);let right = row.right() - 8.0;let english_w = if english.is_empty() {0.0@@ -312,25 +345,21 @@ impl Picker {winui::text_width(&clip, &english) + 12.0};let room = right - (row.left() + 36.0) - english_w;- // Read as its name (and its English name), selected or not (#95: the rows- // were blank to screen readers).- let spoken = if english.is_empty() {- name.clone()- } else {- format!("{name}, {english}")- };- winui::expose(&resp, egui::Role::ListBoxOption, &spoken, true, None);- rows_ui.ctx().accesskit_node_builder(resp.id, |n| {- n.set_selected(on);- n.set_position_in_set(k + 1);- n.set_size_of_set(count);- });+ expose_row(&resp, &name, &english, on, k);let shown = winui::ellipsize(&clip, &winui::tahoma(), &name, room);winui::text(&clip, row.left() + 36.0, y + 17.0, &shown, fg);if !english.is_empty() {winui::text_right(&clip, right, y + 17.0, &english, muted);}}+ for (k, entry) in rows.iter().enumerate().skip(in_view.end) {+ hidden_row(k, *entry, &mut self.selected);+ }+ if let Some(k) = bring {+ let k = k as f32;+ self.top = if k < self.top { k } else { k - page + 1.0 };+ ui.ctx().request_repaint();+ }if rows.is_empty() {winui::text(&p,@@ -401,3 +430,32 @@ impl Picker {)}}++/// A row's name and its English name (empty when it is the same), as the list shows and a+/// screen reader says them. Each name in its own direction: Arabic's right to left, English left+/// to right, in any interface.+fn row_names(entry: Entry) -> (String, String) {+ let info = crate::i18n::info(entry.unwrap_or_else(crate::i18n::system_code));+ match (entry, info) {+ (None, Some(i)) => (+ crate::i18n::fmt(+ crate::i18n::t("Windows' language ({language})"),+ &[("language", i.native)],+ ),+ String::new(),+ ),+ (None, None) => (+ crate::i18n::t("Windows' language").to_owned(),+ String::new(),+ ),+ (Some(_), Some(i)) => (+ crate::i18n::isolate(i.native),+ if i.english == i.native {+ String::new()+ } else {+ crate::i18n::ltr(i.english)+ },+ ),+ (Some(c), None) => (c.to_owned(), String::new()),+ }+}diff --git a/crates/app/src/list.rs b/crates/app/src/list.rsindex 9af1c743..7f3f971d 100644--- a/crates/app/src/list.rs+++ b/crates/app/src/list.rs@@ -736,6 +736,19 @@ pub fn show(st.scroll += winui::wheel_rows(ui, ROW_H, page_rows) * ROW_H;st.hscroll -= ui.input(|i| i.smooth_scroll_delta.x);}+ // Rows out of view are there for screen readers too (#111), as many as `reachable_rows`+ // gives around the view; one asked to scroll into view shows from this frame on.+ let row_id = |idx: usize| egui::Id::unique(("download-row", idx));+ // The number of rows is the list's (UI Automation reads a row's "of M" from its list).+ let a11y = ui+ .ctx()+ .accesskit_node_builder(resp.id, |n| n.set_size_of_set(rows.len()))+ .is_some();+ let page = (body.height() / ROW_H).floor().max(1.0) as usize;+ let reach = winui::reachable_rows(rows.len(), (st.scroll / ROW_H).round() as usize, page);+ if a11y && let Some(idx) = winui::row_asked_for(ui, reach.clone(), row_id) {+ st.scroll_to = Some(idx);+ }if let Some(row) = st.scroll_to.take() {let top = row as f32 * ROW_H;if top < st.scroll {@@ -753,35 +766,68 @@ pub fn show(let last_right = cols.last().map_or(cl, |s| s.2);let mut cut_under_pointer = None;let keys_in_use = winui::keyboard_in_use(ui.ctx());+ // A screen reader's row: the name, then Status and Size, selected or not, its place among all+ // the rows, where it is (out of view: above or below the list).+ let ppp = ui.ctx().pixels_per_point();+ // The rows are the list's children (UI Automation reads "12 of 40" from the list, and finds+ // them under it): made as widgets of a Ui whose parent is the list, clipped to nothing so+ // they take no pointer from it.+ let mut rows_ui = ui.new_child(+ egui::UiBuilder::new()+ .max_rect(screen(body))+ .accessibility_parent(resp.id),+ );+ rows_ui.set_clip_rect(Rect::NOTHING);+ let expose_row = |idx: usize, row: &Row, picked: bool| {+ let top = body_top + (idx as f32 - first as f32) * ROW_H - offset;+ let bounds = screen(Rect::from_min_size(+ pos2(cl, top),+ egui::vec2(rr - cl, ROW_H),+ ));+ rows_ui.interact(bounds, row_id(idx), egui::Sense::hover());+ let spoken = [0usize, 3, 2]+ .iter()+ .map(|c| row.cells[*c].as_str())+ .filter(|t| !t.is_empty())+ .collect::<Vec<_>>()+ .join(", ");+ ui.ctx().accesskit_node_builder(row_id(idx), |n| {+ n.set_role(egui::Role::ListBoxOption);+ n.set_label(spoken);+ n.set_selected(picked);+ // AccessKit counts from 0 (UI Automation and AT-SPI say idx + 1).+ n.set_position_in_set(idx);+ n.set_size_of_set(rows.len());+ n.add_action(egui::accesskit::Action::ScrollIntoView);+ n.set_bounds(egui::accesskit::Rect {+ x0: (bounds.left() * ppp) as f64,+ y0: (bounds.top() * ppp) as f64,+ x1: (bounds.right() * ppp) as f64,+ y1: (bounds.bottom() * ppp) as f64,+ });+ });+ };+ // In the list's order: those above the view, those in it (below, as they are drawn), then+ // those under it.+ let reach = if a11y {+ winui::reachable_rows(rows.len(), first, page)+ } else {+ 0..0+ };+ let expose_out_of_view = |range: std::ops::Range<usize>| {+ for idx in range {+ if let Some(row) = rows.get(idx) {+ expose_row(idx, row, selected.get(idx).copied().unwrap_or(false));+ }+ }+ };+ expose_out_of_view(reach.start..reach.end.min(first));for k in 0..visible {let idx = first + k;let top = body_top + k as f32 * ROW_H - offset;if let Some(row) = rows.get(idx) {let picked = selected.get(idx).copied().unwrap_or(false);- // A screen reader's row: the name, then Status and Size, selected or not.- let ppp = ui.ctx().pixels_per_point();- let bounds = screen(Rect::from_min_size(- pos2(cl, top),- egui::vec2(rr - cl, ROW_H),- ));- let spoken = [0usize, 3, 2]- .iter()- .map(|c| row.cells[*c].as_str())- .filter(|t| !t.is_empty())- .collect::<Vec<_>>()- .join(", ");- ui.ctx()- .accesskit_node_builder(egui::Id::unique(("download-row", idx)), |n| {- n.set_role(egui::Role::ListBoxOption);- n.set_label(spoken);- n.set_selected(picked);- n.set_bounds(egui::accesskit::Rect {- x0: (bounds.left() * ppp) as f64,- y0: (bounds.top() * ppp) as f64,- x1: (bounds.right() * ppp) as f64,- y1: (bounds.bottom() * ppp) as f64,- });- });+ expose_row(idx, row, picked);let sel = picked && st.focused;// The focused row's dotted outline only once the keyboard is in use, as every// control's focus (winui::keyboard_in_use).@@ -885,6 +931,7 @@ pub fn show(fill(&bp, cl, gy, rr, gy, GRID_H());}}+ expose_out_of_view(reach.start.max(first + visible)..reach.end);if let Some(full) = cut_under_pointer {// At the pointer: the list is one widget, and a tip placed by it showed under its// bottom edge, far from the row.diff --git a/crates/app/src/winui.rs b/crates/app/src/winui.rsindex 9f23753a..f1cfbf23 100644--- a/crates/app/src/winui.rs+++ b/crates/app/src/winui.rs@@ -1101,6 +1101,50 @@ pub struct RowLook {pub name: String,}+/// Rows of a virtual list a screen reader reaches (#111): every row of a list up to+/// `A11Y_ROWS`, else that many around the view (`first`, `page` rows), so a list of thousands+/// costs no more than a short one. Further rows come within reach as the list scrolls (the keys+/// scroll it, as a list view's own).+pub fn reachable_rows(n: usize, first: usize, page: usize) -> std::ops::Range<usize> {+ if n <= A11Y_ROWS {+ return 0..n;+ }+ let before = A11Y_ROWS.saturating_sub(page) / 2;+ let start = first.saturating_sub(before).min(n - A11Y_ROWS);+ start..start + A11Y_ROWS+}++/// How many rows of a list a screen reader reaches at most ([`reachable_rows`]).+pub const A11Y_ROWS: usize = 300;++/// The row of `rows` (widget ids `id_of(i)`) a screen reader asked to scroll into view, or to+/// select (AccessKit's click), this frame.+pub fn row_asked_for(+ ui: &Ui,+ rows: std::ops::Range<usize>,+ id_of: impl Fn(usize) -> egui::Id,+) -> Option<usize> {+ use egui::accesskit::Action;+ let targets: Vec<egui::accesskit::NodeId> = ui.input(|i| {+ i.events+ .iter()+ .filter_map(|e| match e {+ egui::Event::AccessKitActionRequest(r)+ if matches!(r.action, Action::ScrollIntoView | Action::Click) =>+ {+ Some(r.target_node)+ }+ _ => None,+ })+ .collect()+ });+ if targets.is_empty() {+ return None;+ }+ rows.into_iter()+ .find(|i| targets.contains(&id_of(*i).accesskit_id()))+}+/// The one list of whole rows in a box (a dialog's list, a tree drawn as rows): its frame,/// rows scrolled whole by the wheel (travel kept until it makes a row) and by a scroll bar/// when they don't all fit, the row under the pointer tinted, the selected row in the@@ -1198,6 +1242,23 @@ pub fn row_list({st.show_row(s, page);}+ // Rows out of view are there for screen readers too (#111): those `reachable_rows` gives+ // (every row of a list up to a few hundred, else that many around the view) while a+ // screen reader is on. A row brought into view by one (Scroll into view, or Select, which+ // AccessKit sends as a click) shows from this frame on.+ // The number of rows is the list's (UI Automation reads a row's "of M" from its list).+ let a11y = ui+ .ctx()+ .accesskit_node_builder(resp.id, |node| node.set_size_of_set(n))+ .is_some();+ let reach = if a11y {+ reachable_rows(n, st.first, page)+ } else {+ st.first..n.min(st.first + page)+ };+ if a11y && let Some(i) = row_asked_for(ui, reach.clone(), |i| id.with(i)) {+ st.show_row(i, page);+ }st.first = st.first.min(max_first);ev.focused = focused;let clip = p.with_clip_rect(rect(area));@@ -1209,12 +1270,18 @@ pub fn row_list(.max_rect(rect(inner)).accessibility_parent(resp.id),);- for i in st.first..n.min(st.first + page) {- let top = inner.top() + 1.0 + row_h * (i - st.first) as f32;+ // Rows out of view lie above or below it, clipped: nothing of them shows or takes a click.+ rows_ui.set_clip_rect(rect(area).intersect(ui.clip_rect()));+ let shown = st.first..n.min(st.first + page);+ for i in reach {+ let in_view = shown.contains(&i);+ let top = inner.top() + 1.0 + row_h * (i as f32 - st.first as f32);let row = Rect::from_min_max(pos2(inner.left(), top), pos2(right, top + row_h));let r = rows_ui.interact(rect(row), id.with(i), pointer_only());let selected = st.selected == Some(i);- let fill = if selected && focused {+ let fill = if !in_view {+ None+ } else if selected && focused {Some(ROW_SELECTED())} else if selected {Some(SELECTED_INACTIVE())@@ -1234,6 +1301,8 @@ pub fn row_list(if st.selected != Some(i) {st.selected = Some(i);ev.picked = Some(i);+ // Selected out of view (a screen reader's Select): brought into view.+ st.pending |= !in_view;// This frame drew the old selection; draw (and expose) the new one now, not on// the next mouse move: a screen reader's click moves no mouse.ui.ctx().request_repaint();@@ -1274,10 +1343,12 @@ pub fn row_list(// Its place among all the rows, not only those drawn (only the rows in view exist).ui.ctx().accesskit_node_builder(r.id, |node| {node.set_selected(selected);- node.set_position_in_set(i + 1);+ // AccessKit counts from 0 (UI Automation and AT-SPI say i + 1).+ node.set_position_in_set(i);node.set_size_of_set(n);+ node.add_action(egui::accesskit::Action::ScrollIntoView);});- if selected && focused {+ if selected && focused && in_view {focus_ring(&clip, rect(row));}}@@ -4663,6 +4734,171 @@ mod tests {out.textures_delta.clear();}+ /// A row list drawn headless with AccessKit on: its rows' nodes (role, name, place in the+ /// list) and the list's state after the frame.+ struct Drawn {+ rows: Vec<(egui::accesskit::NodeId, String, usize, usize)>,+ list_children: usize,+ st: RowList,+ events: RowEvents,+ took: std::time::Duration,+ }++ fn draw_list(ctx: &egui::Context, n: usize, st: RowList, events: Vec<egui::Event>) -> Drawn {+ let mut st = st;+ let mut ev = RowEvents::default();+ let input = egui::RawInput {+ screen_rect: Some(Rect::from_min_size(Pos2::ZERO, egui::vec2(400.0, 300.0))),+ events,+ ..Default::default()+ };+ let started = std::time::Instant::now();+ let mut out = ctx.run_ui(input, |ui| {+ let rc = Rect::from_min_size(pos2(10.0, 10.0), egui::vec2(200.0, 102.0));+ ev = row_list(ui, "test-rows", rc, n, 20.0, &mut st, |_, _, i, _, look| {+ look.name = format!("Row {i}");+ });+ });+ let took = started.elapsed();+ out.textures_delta.clear();+ let update = out+ .platform_output+ .accesskit_update+ .expect("AccessKit is on");+ let mut rows = Vec::new();+ let by_id: std::collections::HashMap<_, _> =+ update.nodes.iter().map(|(id, n)| (*id, n)).collect();+ // The list's rows as a screen reader sees them: its children, through the containers+ // that AccessKit leaves out.+ fn options(+ by_id: &std::collections::HashMap<egui::accesskit::NodeId, &egui::accesskit::Node>,+ node: &egui::accesskit::Node,+ ) -> usize {+ node.children()+ .iter()+ .filter_map(|c| by_id.get(c))+ .map(|c| match c.role() {+ egui::accesskit::Role::ListBoxOption => 1,+ egui::accesskit::Role::GenericContainer => options(by_id, c),+ _ => 0,+ })+ .sum()+ }+ let mut list_children = 0;+ for (id, node) in &update.nodes {+ match node.role() {+ egui::accesskit::Role::ListBoxOption => rows.push((+ *id,+ node.label().unwrap_or_default().to_owned(),+ node.position_in_set().unwrap_or(0),+ node.size_of_set().unwrap_or(0),+ )),+ egui::accesskit::Role::ListBox => list_children = options(&by_id, node),+ _ => {}+ }+ }+ rows.sort_by_key(|r| r.2);+ Drawn {+ rows,+ list_children,+ st,+ events: ev,+ took,+ }+ }++ fn ask(target: egui::accesskit::NodeId, action: egui::accesskit::Action) -> egui::Event {+ egui::Event::AccessKitActionRequest(egui::accesskit::ActionRequest {+ action,+ target_tree: egui::accesskit::TreeId::ROOT,+ target_node: target,+ data: None,+ })+ }++ /// #111: every row of a short list is in the accessibility tree, in view or not, inside the+ /// list, named, with its place; a screen reader can scroll one into view or select it.+ #[test]+ fn every_row_of_a_short_list_is_reachable() {+ use egui::accesskit::Action;+ let ctx = egui::Context::default();+ ctx.enable_accesskit();+ let st = RowList::default();+ let d = draw_list(&ctx, 40, st, vec![]);+ let d = draw_list(&ctx, 40, d.st, vec![]);+ assert_eq!(d.rows.len(), 40, "every row has a node");+ assert_eq!(d.list_children, 40, "inside the list");+ for (i, (_, name, pos, size)) in d.rows.iter().enumerate() {+ assert_eq!(+ (name.as_str(), *pos, *size),+ (format!("Row {i}").as_str(), i, 40)+ );+ }+ assert_eq!(d.st.first, 0);+ // Scroll into view: row 35 shows (the view is 5 rows).+ let row35 = d.rows[35].0;+ let d = draw_list(&ctx, 40, d.st, vec![ask(row35, Action::ScrollIntoView)]);+ assert!((d.st.first..d.st.first + 5).contains(&35), "{:?}", d.st);+ // Select (AccessKit's click) a row out of view: selected and brought into view.+ let row2 = d.rows[2].0;+ let d = draw_list(&ctx, 40, d.st, vec![ask(row2, Action::Click)]);+ assert_eq!((d.st.selected, d.events.picked), (Some(2), Some(2)));+ let d = draw_list(&ctx, 40, d.st, vec![]);+ assert!((d.st.first..d.st.first + 5).contains(&2), "{:?}", d.st);+ }++ /// #111: a list of thousands (a playlist, #69) exposes a bounded window of rows around the+ /// view, each with its place among all of them, so a frame costs what a short list's does.+ #[test]+ fn a_long_list_exposes_a_window_of_rows_around_the_view() {+ let ctx = egui::Context::default();+ ctx.enable_accesskit();+ let st = RowList {+ first: 5_000,+ ..RowList::default()+ };+ let d = draw_list(&ctx, 10_000, st, vec![]);+ let d = draw_list(&ctx, 10_000, d.st, vec![]);+ assert_eq!(d.rows.len(), A11Y_ROWS);+ let (lo, hi) = (d.rows[0].2, d.rows[A11Y_ROWS - 1].2);+ assert!(lo < 5_000 && hi >= 5_004, "{lo}..={hi}");+ assert!(d.rows.iter().all(|r| r.3 == 10_000));+ // Timing, for the record (cargo test --release -- --nocapture): AccessKit on vs off.+ let mut on = std::time::Duration::ZERO;+ let mut st = d.st;+ for _ in 0..20 {+ let d = draw_list(&ctx, 10_000, st, vec![]);+ on += d.took;+ st = d.st;+ }+ let off_ctx = egui::Context::default();+ let mut off = std::time::Duration::ZERO;+ for _ in 0..20 {+ let started = std::time::Instant::now();+ let mut out = off_ctx.run_ui(egui::RawInput::default(), |ui| {+ let rc = Rect::from_min_size(pos2(10.0, 10.0), egui::vec2(200.0, 102.0));+ row_list(+ ui,+ "test-rows",+ rc,+ 10_000,+ 20.0,+ &mut st,+ |_, _, i, _, look| {+ look.name = format!("Row {i}");+ },+ );+ });+ off += started.elapsed();+ out.textures_delta.clear();+ }+ println!(+ "10,000 rows, a frame: {:?} with a screen reader on, {:?} off",+ on / 20,+ off / 20+ );+ }+#[test]fn a_control_greyed_with_the_keys_hands_them_on() {let ctx = egui::Context::default();