mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-27 16:59:43 +01:00
Select gradient mode buttons by their accessibility role
This commit is contained in:
1 parent
f7a8565ca4
commit
a99db2ce13
1 file changed
+3
-1
@@ -110,7 +110,9 @@ impl Scene {
|
||||
self.buttons.clear();
|
||||
let update = output.platform_output.accesskit_update.as_ref().expect("AccessKit enabled");
|
||||
for (_, node) in &update.nodes {
|
||||
if let Some((label, bounds)) = node.label().zip(node.bounds()) {
|
||||
if node.role() == egui::accesskit::Role::Button
|
||||
&& let Some((label, bounds)) = node.label().zip(node.bounds())
|
||||
{
|
||||
self.buttons
|
||||
.push((label.to_owned(), Rect::from_min_max(pos2(bounds.x0 as f32, bounds.y0 as f32), pos2(bounds.x1 as f32, bounds.y1 as f32))));
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user