update iris
This commit is contained in:
@@ -6,7 +6,6 @@ pub fn werror(ui: &mut Ui, msg: &str) -> WidgetRef {
|
||||
.pad(10)
|
||||
.background(rect(Color::RED).radius(10))
|
||||
.add(ui)
|
||||
.any()
|
||||
}
|
||||
|
||||
pub fn hint(msg: impl Into<String>) -> TextBuilder {
|
||||
@@ -28,7 +27,6 @@ pub fn field_box(field: WidgetRef<TextEdit>, ui: &mut Ui) -> WidgetRef {
|
||||
.background(rect(Color::BLACK.brighter(0.1)).radius(15))
|
||||
.attr::<Selector>(field)
|
||||
.add(ui)
|
||||
.any()
|
||||
}
|
||||
|
||||
#[derive(Clone)]
|
||||
@@ -70,8 +68,7 @@ impl Button {
|
||||
})
|
||||
.height(60)
|
||||
.foreground(wtext(text).size(25).text_align(Align::CENTER))
|
||||
.add(ui)
|
||||
.any();
|
||||
.add(ui);
|
||||
let root_ = root.clone();
|
||||
let enabled_ = enabled.clone();
|
||||
rect.clone()
|
||||
@@ -100,3 +97,17 @@ impl Button {
|
||||
self.rect.get_mut().color = self.color.darker(0.8);
|
||||
}
|
||||
}
|
||||
|
||||
widget_trait! {
|
||||
pub Stuff;
|
||||
fn modal(self, width: impl UiNum) -> impl WidgetIdFn {
|
||||
|ui| {
|
||||
self
|
||||
.pad(15)
|
||||
.background(rect(color::MODAL_BG).radius(15))
|
||||
.width(width)
|
||||
.align(Align::CENTER)
|
||||
.add(ui)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user