Skip to content

Commit

Permalink
Implement Column and Row changes in iced_web
Browse files Browse the repository at this point in the history
  • Loading branch information
hecrj committed Mar 16, 2020
1 parent 95c8031 commit 99b5212
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 24 deletions.
15 changes: 3 additions & 12 deletions web/src/widget/column.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
15 changes: 3 additions & 12 deletions web/src/widget/row.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 99b5212

Please sign in to comment.