1
0
mirror of https://github.com/emilk/egui.git synced 2026-06-26 22:53:14 -04:00

Disabled widgets are now also disabled in the accesskit output (#4750)

Marking widgets as disabled was not reflected in the accesskit output,
now the disabled status should match.

---------

Co-authored-by: Wybe Westra <w.westra@kwantcontrols.nl>
This commit is contained in:
Wybe Westra
2024-07-02 09:18:30 +02:00
committed by GitHub
parent fcec84ca74
commit fa8d535fe7
18 changed files with 165 additions and 72 deletions

View File

@@ -117,8 +117,14 @@ impl LegendEntry {
let desired_size = total_extra + galley.size();
let (rect, response) = ui.allocate_exact_size(desired_size, Sense::click());
response
.widget_info(|| WidgetInfo::selected(WidgetType::Checkbox, *checked, galley.text()));
response.widget_info(|| {
WidgetInfo::selected(
WidgetType::Checkbox,
ui.is_enabled(),
*checked,
galley.text(),
)
});
let visuals = ui.style().interact(&response);
let label_on_the_left = ui.layout().horizontal_placement() == Align::RIGHT;