Refactor BorderRadius and move it to the border modules

BorderRadius now parses itself reusing Rect<T>.
This commit is contained in:
Anthony Ramine 2017-05-28 11:24:25 +02:00
parent 4144dc74db
commit af3ede418b
20 changed files with 269 additions and 286 deletions

View file

@ -56,6 +56,13 @@ impl<T: HasViewportPercentage> HasViewportPercentage for Option<T> {
}
}
impl<T: HasViewportPercentage, U> HasViewportPercentage for TypedSize2D<T, U> {
#[inline]
fn has_viewport_percentage(&self) -> bool {
self.width.has_viewport_percentage() || self.height.has_viewport_percentage()
}
}
impl<T: HasViewportPercentage> HasViewportPercentage for Vec<T> {
#[inline]
fn has_viewport_percentage(&self) -> bool {