Remove stretch optional dependency in core
This commit is contained in:
parent
0a93be78b8
commit
a975754ab0
5 changed files with 49 additions and 111 deletions
|
|
@ -6,8 +6,3 @@ edition = "2018"
|
|||
description = "The essential concepts of Iced"
|
||||
license = "MIT"
|
||||
repository = "https://github.com/hecrj/iced"
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
[dependencies]
|
||||
stretch = { version = "0.2", optional = true }
|
||||
|
|
|
|||
|
|
@ -19,29 +19,3 @@ pub enum Align {
|
|||
/// Stretch over the cross axis.
|
||||
Stretch,
|
||||
}
|
||||
|
||||
#[cfg(feature = "stretch")]
|
||||
#[doc(hidden)]
|
||||
impl From<Align> for stretch::style::AlignItems {
|
||||
fn from(align: Align) -> Self {
|
||||
match align {
|
||||
Align::Start => stretch::style::AlignItems::FlexStart,
|
||||
Align::Center => stretch::style::AlignItems::Center,
|
||||
Align::End => stretch::style::AlignItems::FlexEnd,
|
||||
Align::Stretch => stretch::style::AlignItems::Stretch,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(feature = "stretch")]
|
||||
#[doc(hidden)]
|
||||
impl From<Align> for stretch::style::AlignSelf {
|
||||
fn from(align: Align) -> Self {
|
||||
match align {
|
||||
Align::Start => stretch::style::AlignSelf::FlexStart,
|
||||
Align::Center => stretch::style::AlignSelf::Center,
|
||||
Align::End => stretch::style::AlignSelf::FlexEnd,
|
||||
Align::Stretch => stretch::style::AlignSelf::Stretch,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -25,20 +25,3 @@ pub enum Justify {
|
|||
/// Place items with evenly distributed space.
|
||||
SpaceEvenly,
|
||||
}
|
||||
|
||||
#[cfg(feature = "stretch")]
|
||||
#[doc(hidden)]
|
||||
impl From<Justify> for stretch::style::JustifyContent {
|
||||
fn from(justify: Justify) -> Self {
|
||||
match justify {
|
||||
Justify::Start => stretch::style::JustifyContent::FlexStart,
|
||||
Justify::Center => stretch::style::JustifyContent::Center,
|
||||
Justify::End => stretch::style::JustifyContent::FlexEnd,
|
||||
Justify::SpaceBetween => {
|
||||
stretch::style::JustifyContent::SpaceBetween
|
||||
}
|
||||
Justify::SpaceAround => stretch::style::JustifyContent::SpaceAround,
|
||||
Justify::SpaceEvenly => stretch::style::JustifyContent::SpaceEvenly,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue