diff options
author | 2021-09-20 15:54:19 +0700 | |
---|---|---|
committer | 2021-09-20 15:54:19 +0700 | |
commit | 35c4ad6dd950fa91d181f4d3253fcb486bcf1b11 (patch) | |
tree | 8420a91cd319a63b1ed257a6334453a1a673bdfb /web/src/widget/column.rs | |
parent | 456a3f15e4226cc781a8825bddaaf066476d4351 (diff) | |
parent | a0ad3996225601aaa1ebe051cba115374b55c80e (diff) | |
download | iced-35c4ad6dd950fa91d181f4d3253fcb486bcf1b11.tar.gz iced-35c4ad6dd950fa91d181f4d3253fcb486bcf1b11.tar.bz2 iced-35c4ad6dd950fa91d181f4d3253fcb486bcf1b11.zip |
Merge pull request #1044 from tarkah/feature/align-fill-variant
Add Align::Fill variant
Diffstat (limited to 'web/src/widget/column.rs')
-rw-r--r-- | web/src/widget/column.rs | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/web/src/widget/column.rs b/web/src/widget/column.rs index 8738c2af..30a57c41 100644 --- a/web/src/widget/column.rs +++ b/web/src/widget/column.rs @@ -1,4 +1,5 @@ -use crate::{css, Align, Bus, Css, Element, Length, Padding, Widget}; +use crate::css; +use crate::{Alignment, Bus, Css, Element, Length, Padding, Widget}; use dodrio::bumpalo; use std::u32; @@ -14,7 +15,7 @@ pub struct Column<'a, Message> { height: Length, max_width: u32, max_height: u32, - align_items: Align, + align_items: Alignment, children: Vec<Element<'a, Message>>, } @@ -33,7 +34,7 @@ impl<'a, Message> Column<'a, Message> { height: Length::Shrink, max_width: u32::MAX, max_height: u32::MAX, - align_items: Align::Start, + align_items: Alignment::Start, children, } } @@ -79,7 +80,7 @@ impl<'a, Message> Column<'a, Message> { } /// Sets the horizontal alignment of the contents of the [`Column`] . - pub fn align_items(mut self, align: Align) -> Self { + pub fn align_items(mut self, align: Alignment) -> Self { self.align_items = align; self } @@ -129,7 +130,7 @@ impl<'a, Message> Widget<Message> for Column<'a, Message> { css::max_length(self.max_width), css::max_length(self.max_height), css::padding(self.padding), - css::align(self.align_items) + css::alignment(self.align_items) ).into_bump_str() ) .children(children) |