Implement Column
and Row
changes in iced_web
This commit is contained in:
parent
95c8031f3d
commit
99b5212550
@ -25,22 +25,13 @@ impl<'a, Message> Column<'a, Message> {
|
|||||||
///
|
///
|
||||||
/// [`Column`]: struct.Column.html
|
/// [`Column`]: struct.Column.html
|
||||||
pub fn new() -> Self {
|
pub fn new() -> Self {
|
||||||
Column {
|
Self::with_children(Vec::new())
|
||||||
spacing: 0,
|
|
||||||
padding: 0,
|
|
||||||
width: Length::Fill,
|
|
||||||
height: Length::Shrink,
|
|
||||||
max_width: u32::MAX,
|
|
||||||
max_height: u32::MAX,
|
|
||||||
align_items: Align::Start,
|
|
||||||
children: Vec::new(),
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Creates a [`Column`] with children.
|
/// Creates a [`Column`] with the given elements.
|
||||||
///
|
///
|
||||||
/// [`Column`]: struct.Column.html
|
/// [`Column`]: struct.Column.html
|
||||||
pub fn new_with_children(children: Vec<Element<'a, Message>>) -> Self {
|
pub fn with_children(children: Vec<Element<'a, Message>>) -> Self {
|
||||||
Column {
|
Column {
|
||||||
spacing: 0,
|
spacing: 0,
|
||||||
padding: 0,
|
padding: 0,
|
||||||
|
@ -25,22 +25,13 @@ impl<'a, Message> Row<'a, Message> {
|
|||||||
///
|
///
|
||||||
/// [`Row`]: struct.Row.html
|
/// [`Row`]: struct.Row.html
|
||||||
pub fn new() -> Self {
|
pub fn new() -> Self {
|
||||||
Row {
|
Self::with_children(Vec::new())
|
||||||
spacing: 0,
|
|
||||||
padding: 0,
|
|
||||||
width: Length::Fill,
|
|
||||||
height: Length::Shrink,
|
|
||||||
max_width: u32::MAX,
|
|
||||||
max_height: u32::MAX,
|
|
||||||
align_items: Align::Start,
|
|
||||||
children: Vec::new(),
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Creates a [`Row`] with children.
|
/// Creates a [`Row`] with the given elements.
|
||||||
///
|
///
|
||||||
/// [`Row`]: struct.Row.html
|
/// [`Row`]: struct.Row.html
|
||||||
pub fn new_with_children(children: Vec<Element<'a, Message>>) -> Self {
|
pub fn with_children(children: Vec<Element<'a, Message>>) -> Self {
|
||||||
Row {
|
Row {
|
||||||
spacing: 0,
|
spacing: 0,
|
||||||
padding: 0,
|
padding: 0,
|
||||||
|
Loading…
Reference in New Issue
Block a user