clean up
This commit is contained in:
@@ -31,8 +31,12 @@ impl From<UI> for UIBuilder {
|
||||
}
|
||||
|
||||
impl UIBuilder {
|
||||
pub fn add<W: Widget>(&mut self, w: W) -> WidgetRef<W> {
|
||||
WidgetRef::new(self.clone(), [self.push(w)])
|
||||
pub fn add<W: Widget>(&mut self, w: impl WidgetLike<Widget = W>) -> WidgetRef<W> {
|
||||
WidgetRef::new([w.add(self).erase_type()])
|
||||
}
|
||||
|
||||
pub fn add_widget<W: Widget>(&mut self, w: W) -> WidgetRef<W> {
|
||||
WidgetRef::new([self.push(w)])
|
||||
}
|
||||
|
||||
pub fn push<W: Widget>(&mut self, w: W) -> WidgetId {
|
||||
|
||||
Reference in New Issue
Block a user