refactor(widget): create alias for Row type
This commit is contained in:
parent
6402bcfe26
commit
03a5c929fd
1 changed files with 4 additions and 6 deletions
|
|
@ -93,22 +93,20 @@ pub mod rectangle_tracker;
|
||||||
|
|
||||||
pub use row::{row, Row};
|
pub use row::{row, Row};
|
||||||
pub mod row {
|
pub mod row {
|
||||||
pub use iced::widget::Row;
|
pub type Row<'a, Message> = iced::widget::Row<'a, Message, crate::Renderer>;
|
||||||
|
|
||||||
#[must_use]
|
#[must_use]
|
||||||
pub fn row<'a, Message>() -> Row<'a, Message, crate::Renderer> {
|
pub fn row<'a, Message>() -> Row<'a, Message> {
|
||||||
Row::new()
|
Row::new()
|
||||||
}
|
}
|
||||||
|
|
||||||
#[must_use]
|
#[must_use]
|
||||||
pub fn with_capacity<'a, Message>(capacity: usize) -> Row<'a, Message, crate::Renderer> {
|
pub fn with_capacity<'a, Message>(capacity: usize) -> Row<'a, Message> {
|
||||||
Row::with_children(Vec::with_capacity(capacity))
|
Row::with_children(Vec::with_capacity(capacity))
|
||||||
}
|
}
|
||||||
|
|
||||||
#[must_use]
|
#[must_use]
|
||||||
pub fn with_children<Message>(
|
pub fn with_children<Message>(children: Vec<crate::Element<Message>>) -> Row<Message> {
|
||||||
children: Vec<crate::Element<Message>>,
|
|
||||||
) -> Row<Message, crate::Renderer> {
|
|
||||||
Row::with_children(children)
|
Row::with_children(children)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue