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
@@ -64,15 +64,14 @@ impl View for ActiveBufferLanguage {
|
||||
Label::new(active_language_text, style.text.clone())
|
||||
.contained()
|
||||
.with_style(style.container)
|
||||
.boxed()
|
||||
})
|
||||
.with_cursor_style(CursorStyle::PointingHand)
|
||||
.on_click(MouseButton::Left, |_, _, cx| {
|
||||
cx.dispatch_action(crate::Toggle)
|
||||
})
|
||||
.boxed()
|
||||
.into_element()
|
||||
} else {
|
||||
Empty::new().boxed()
|
||||
Empty::new().into_element()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user