clean up
This commit is contained in:
1 parent
577d62b1da
commit
848347e6b3
4 files changed
+17
-19
No files matched your search
+6
-2
@@ -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