INNER CODE UNIT · Rust
Some
abenz1267/walker · src/preview/mod.rs:290
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);
}
if let Some(scrolled) = child.downcast_ref::<ScrolledWindow>()
&& let Some(scrolled_child) = scrolled.child()
{
if let Some(text_view) = scrolled_child.downcast_ref::<TextView>() {
text_view.buffer().set_text("");
}
if let Some(picture) = scrolled_child.downcast_ref::<Picture>() {
picture.set_filename(Option::<&str>::None);
picture.set_paintable(gtk4::gdk::Paintable::NONE);
}