INNER CODE UNIT · Rust
Some
abenz1267/walker · src/preview/mod.rs:279
if let Some(image) = child.downcast_ref::<Image>() {
image.clear();
image.set_icon_name(Option::<&str>::None);
}
while let Some(container) = child.downcast_ref::<gtk4::Box>()
&& let Some(nested_child) = container.first_child()
{
if let Some(nested_picture) = nested_child.downcast_ref::<Picture>() {
nested_picture.set_paintable(gtk4::gdk::Paintable::NONE);
}
if let Some(nested_image) = nested_child.downcast_ref::<Image>() {
nested_image.clear();
nested_image.set_icon_name(Option::<&str>::None);
}
container.remove(&nested_child);
}