v0.27.3
Switch, Checkbox, and ProgressBar join Slider on the dual-channel
gesture path. on Toggled { ... } and on ValueChanged { ... } route
through dedicated handler components (SwitchHandler, CheckboxHandler,
ProgressBarHandler) instead of the generic GestureHandler.
Added
SwitchEvent::Toggled { now }+SwitchHandler— fires afterswitch_handlerflipsSwitch.on.CheckboxEvent::Toggled { now }+CheckboxHandler— fires aftercheckbox_handlerflipsCheckbox.checked.ProgressBarEvent::ValueChanged { new: f32, old: f32 }+ProgressBarHandler— fires when a Tap or DragMove movesProgressBar.value(only when the new value differs from the old).ui! { Switch (...) on Toggled { ... } {} }and the same for Checkbox / ProgressBar —now,new,oldauto-destructured into the body's scope. Qualified forms (on Switch::Toggledetc.) work too.gallery/examples/toggle_demo.rs— Switch + Checkbox in modifier-chain form with shared stats resource and live label.
Changed
switch_handler,checkbox_handler,progress_bar_handlermoved toView::with_internal_gesture. A userworld.insert(entity, GestureHandler { ... })on these components no longer overwrites the toggle / value-update behaviour.