diff options
author | 2020-03-17 00:53:51 +0100 | |
---|---|---|
committer | 2020-03-17 00:53:51 +0100 | |
commit | 99b5212550f225a21e1d1144c6fb9ebb8f4e6ed2 (patch) | |
tree | 16b1b48e2aa04efa8dacfcde88ee40f2e5a16ad7 /web | |
parent | 95c8031f3d2800ade28b593c17c138c6d389b1ae (diff) | |
download | iced-99b5212550f225a21e1d1144c6fb9ebb8f4e6ed2.tar.gz iced-99b5212550f225a21e1d1144c6fb9ebb8f4e6ed2.tar.bz2 iced-99b5212550f225a21e1d1144c6fb9ebb8f4e6ed2.zip |
Implement `Column` and `Row` changes in `iced_web`
Diffstat (limited to 'web')
-rw-r--r-- | web/src/widget/column.rs | 15 | ||||
-rw-r--r-- | web/src/widget/row.rs | 15 |
2 files changed, 6 insertions, 24 deletions
diff --git a/web/src/widget/column.rs b/web/src/widget/column.rs index f1d9f9a2..25b88b0e 100644 --- a/web/src/widget/column.rs +++ b/web/src/widget/column.rs @@ -25,22 +25,13 @@ impl<'a, Message> Column<'a, Message> { /// /// [`Column`]: struct.Column.html pub fn new() -> Self { - Column { - 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(), - } + Self::with_children(Vec::new()) } - /// Creates a [`Column`] with children. + /// Creates a [`Column`] with the given elements. /// /// [`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 { spacing: 0, padding: 0, diff --git a/web/src/widget/row.rs b/web/src/widget/row.rs index 55077d52..cfa10fdf 100644 --- a/web/src/widget/row.rs +++ b/web/src/widget/row.rs @@ -25,22 +25,13 @@ impl<'a, Message> Row<'a, Message> { /// /// [`Row`]: struct.Row.html pub fn new() -> Self { - Row { - 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(), - } + Self::with_children(Vec::new()) } - /// Creates a [`Row`] with children. + /// Creates a [`Row`] with the given elements. /// /// [`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 { spacing: 0, padding: 0, |