we love post fix
This commit is contained in:
@@ -33,6 +33,12 @@ pub trait WidgetLike<Ctx, Tag> {
|
||||
{
|
||||
self.add(ui).into_static()
|
||||
}
|
||||
fn set_root(self, ui: &mut Ui<Ctx>)
|
||||
where
|
||||
Self: Sized,
|
||||
{
|
||||
ui.set_root(self);
|
||||
}
|
||||
}
|
||||
|
||||
/// A function that returns a widget given a UI.
|
||||
|
||||
@@ -183,13 +183,13 @@ impl Client {
|
||||
|
||||
let info = text("").add(&mut ui);
|
||||
let info_sect = info.clone().pad(10).align(Align::BotLeft);
|
||||
ui.set_root(
|
||||
|
||||
(
|
||||
(tabs, main).span(Dir::DOWN, [fixed(40), ratio(1)]),
|
||||
info_sect,
|
||||
)
|
||||
.stack(),
|
||||
);
|
||||
.stack()
|
||||
.set_root(&mut ui);
|
||||
|
||||
Self {
|
||||
renderer,
|
||||
|
||||
Reference in New Issue
Block a user