convenience methods for span
This commit is contained in:
@@ -62,6 +62,14 @@ impl Span {
|
||||
self
|
||||
}
|
||||
|
||||
pub fn push(&mut self, w: WidgetHandle) {
|
||||
self.children.push(w);
|
||||
}
|
||||
|
||||
pub fn pop(&mut self) -> Option<WidgetHandle> {
|
||||
self.children.pop()
|
||||
}
|
||||
|
||||
fn len_sum(&mut self, ctx: &mut SizeCtx) -> Len {
|
||||
let gap = self.gap * self.children.len().saturating_sub(1) as f32;
|
||||
self.children.iter().fold(Len::abs(gap), |mut s, id| {
|
||||
|
||||
Reference in New Issue
Block a user