Rename Drawable::boxed to into_element and make containers generic
Multi-element are now generic over any drawable child, which can be converted into an element. Co-Authored-By: Nathan Sobo <nathan@zed.dev> Co-Authored-By: Max Brunsfeld <max@zed.dev>
This commit is contained in:
committed by
Nathan Sobo
co-authored by
Nathan Sobo
Max Brunsfeld
parent
4d433663bd
commit
03619dfa55
@@ -343,20 +343,18 @@ impl View for ActivityIndicator {
|
||||
.contained()
|
||||
.with_margin_right(style.icon_spacing)
|
||||
.aligned()
|
||||
.named("activity-icon")
|
||||
.into_named_element("activity-icon")
|
||||
}))
|
||||
.with_child(
|
||||
Text::new(message, style.message.clone())
|
||||
.with_soft_wrap(false)
|
||||
.aligned()
|
||||
.boxed(),
|
||||
.aligned(),
|
||||
)
|
||||
.constrained()
|
||||
.with_height(style.height)
|
||||
.contained()
|
||||
.with_style(style.container)
|
||||
.aligned()
|
||||
.boxed()
|
||||
});
|
||||
|
||||
if let Some(action) = action {
|
||||
@@ -367,7 +365,7 @@ impl View for ActivityIndicator {
|
||||
});
|
||||
}
|
||||
|
||||
element.boxed()
|
||||
element.into_element()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user