summaryrefslogtreecommitdiffstats
path: root/web/src/widget/row.rs
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2021-09-20 15:09:55 +0700
committerLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2021-09-20 15:14:08 +0700
commita0ad3996225601aaa1ebe051cba115374b55c80e (patch)
tree8420a91cd319a63b1ed257a6334453a1a673bdfb /web/src/widget/row.rs
parent5fae6e59ffbc5913761df638dc7f0c35b7f43bc9 (diff)
downloadiced-a0ad3996225601aaa1ebe051cba115374b55c80e.tar.gz
iced-a0ad3996225601aaa1ebe051cba115374b55c80e.tar.bz2
iced-a0ad3996225601aaa1ebe051cba115374b55c80e.zip
Refactor alignment types into an `alignment` module
Diffstat (limited to 'web/src/widget/row.rs')
-rw-r--r--web/src/widget/row.rs11
1 files changed, 6 insertions, 5 deletions
diff --git a/web/src/widget/row.rs b/web/src/widget/row.rs
index ffb515cf..13eab27d 100644
--- a/web/src/widget/row.rs
+++ b/web/src/widget/row.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 Row<'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> Row<'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> Row<'a, Message> {
}
/// Sets the vertical alignment of the contents of the [`Row`] .
- 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 Row<'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)