I’ve been thinking that it might be useful is to add a disable method to the Widget trait, which would make disabling different widgets the same across different widgets. And it’s possible to have a empty default method to keep backwards compatibility:
/// Disables the [`Widget`]
fn disable(&mut self) {
}
This would also allow disabling a whole row, column, etc. with e.g. this implementation for Row:
fn disable(&mut self) {
for child in &mut self.children {
child.as_widget_mut().disable();
}
}
One issue with this approach as I’ve tested it is that the application code either needs the advanced feature (to get the Widget trait) or a disable() method should be added to Element, but this might complicate application code a bit the need for into() calls.