mirror of
https://github.com/storytold/effectcraft.git
synced 2026-11-01 05:58:19 -06:00
Merge main into #1339; name the new Properties label control
The merge of main brought a double-click label hit area on the Properties transform rows that had no accessible name; give it one so the audit ratchet holds. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 5.5
parent
ea5bd7d171
commit
b4c1569680
@@ -346,14 +346,14 @@ fn preset_row(
|
||||
name: &str,
|
||||
auto_id: &str,
|
||||
query: &str,
|
||||
on_apply: impl FnOnce() -> Apply,
|
||||
on_apply: impl Fn() -> Apply,
|
||||
apply: &mut Option<Apply>,
|
||||
) {
|
||||
let t = app.tokens;
|
||||
let r = Rect::from_min_size(pos2(list.min.x, *y), vec2(list.width(), ROW_H));
|
||||
let id = egui::Id::new(("fxpreset", auto_id));
|
||||
let tab = nav.tab_stop(id);
|
||||
let selected = nav.push(id, *y, 3, None, Some(on_apply.clone()));
|
||||
let selected = nav.push(id, *y, 3, None, Some(on_apply()));
|
||||
*y += ROW_H;
|
||||
if r.max.y < list.min.y || r.min.y > list.max.y {
|
||||
return;
|
||||
|
||||
@@ -246,6 +246,7 @@ fn transform_row(app: &mut EffectcraftApp, ui: &mut egui::Ui, p: &egui::Painter,
|
||||
let vx = r.min.x + (r.width() * 0.5).max(130.0);
|
||||
let label = Rect::from_min_max(pos2(r.min.x + 42.0, r.min.y), pos2(vx - 20.0, r.max.y));
|
||||
let resp = ui.interact(label, egui::Id::new(("props-label", uid)), Sense::click());
|
||||
crate::a11y::role_name(&resp, egui::accesskit::Role::Button, &pr.name);
|
||||
app.auto.add(&format!("{base}.label"), label, &pr.name);
|
||||
if resp.double_clicked() {
|
||||
app.ui.timeline.search.clear();
|
||||
|
||||
Reference in New Issue
Block a user