Introduce and use CrossAlign enum for Column and Row
This commit is contained in:
parent
95e4791a1e
commit
5fae6e59ff
33 changed files with 166 additions and 115 deletions
|
|
@ -1,5 +1,5 @@
|
|||
//! Style your widgets.
|
||||
use crate::{bumpalo, Align, Background, Color, Length, Padding};
|
||||
use crate::{bumpalo, Align, Background, Color, CrossAlign, Length, Padding};
|
||||
|
||||
use std::collections::BTreeMap;
|
||||
|
||||
|
|
@ -201,7 +201,16 @@ pub fn align(align: Align) -> &'static str {
|
|||
Align::Start => "flex-start",
|
||||
Align::Center => "center",
|
||||
Align::End => "flex-end",
|
||||
Align::Fill => "stretch",
|
||||
}
|
||||
}
|
||||
|
||||
/// Returns the style value for the given [`CrossAlign`].
|
||||
pub fn cross_align(align: CrossAlign) -> &'static str {
|
||||
match align {
|
||||
CrossAlign::Start => "flex-start",
|
||||
CrossAlign::Center => "center",
|
||||
CrossAlign::End => "flex-end",
|
||||
CrossAlign::Fill => "stretch",
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -74,8 +74,9 @@ pub use dodrio;
|
|||
pub use element::Element;
|
||||
pub use hasher::Hasher;
|
||||
pub use iced_core::{
|
||||
keyboard, mouse, Align, Background, Color, Font, HorizontalAlignment,
|
||||
Length, Padding, Point, Rectangle, Size, Vector, VerticalAlignment,
|
||||
keyboard, mouse, Align, Background, Color, CrossAlign, Font,
|
||||
HorizontalAlignment, Length, Padding, Point, Rectangle, Size, Vector,
|
||||
VerticalAlignment,
|
||||
};
|
||||
pub use iced_futures::{executor, futures};
|
||||
pub use subscription::Subscription;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue