diff options
Diffstat (limited to 'native/src/widget/row.rs')
-rw-r--r-- | native/src/widget/row.rs | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/native/src/widget/row.rs b/native/src/widget/row.rs index 775b953e..3d803fa2 100644 --- a/native/src/widget/row.rs +++ b/native/src/widget/row.rs @@ -42,6 +42,22 @@ impl<'a, Message, Renderer> Row<'a, Message, Renderer> { } } + /// Creates a [`Row`] with children. + /// + /// [`Row`]: struct.Row.html + pub fn new_with_children(children: Vec<Element<'a, Message, Renderer>>) -> Self { + Row { + spacing: 0, + padding: 0, + width: Length::Shrink, + height: Length::Shrink, + max_width: u32::MAX, + max_height: u32::MAX, + align_items: Align::Start, + children, + } + } + /// Sets the horizontal spacing _between_ elements. /// /// Custom margins per element do not exist in Iced. You should use this |