mirror of
https://github.com/danbulant/cushy
synced 2026-09-18 05:53:46 +00:00
CornerRadii conversion helpers
This commit is contained in:
parent
af208519eb
commit
b0a870aceb
1 changed files with 23 additions and 0 deletions
|
|
@ -1458,6 +1458,29 @@ impl IntoValue<FlexibleDimension> for Dimension {
|
|||
}
|
||||
}
|
||||
|
||||
impl IntoValue<CornerRadii<Dimension>> for Dimension {
|
||||
fn into_value(self) -> Value<CornerRadii<Dimension>> {
|
||||
Value::Constant(CornerRadii {
|
||||
top_left: self,
|
||||
top_right: self,
|
||||
bottom_right: self,
|
||||
bottom_left: self,
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
impl IntoValue<CornerRadii<Dimension>> for Lp {
|
||||
fn into_value(self) -> Value<CornerRadii<Dimension>> {
|
||||
Dimension::Lp(self).into_value()
|
||||
}
|
||||
}
|
||||
|
||||
impl IntoValue<CornerRadii<Dimension>> for Px {
|
||||
fn into_value(self) -> Value<CornerRadii<Dimension>> {
|
||||
Dimension::Px(self).into_value()
|
||||
}
|
||||
}
|
||||
|
||||
impl<U> ScreenScale for Edges<U>
|
||||
where
|
||||
U: ScreenScale<Px = Px, UPx = UPx, Lp = Lp>,
|
||||
|
|
|
|||
Loading…
Reference in a new issue