fixup! feat(core): introduce new drawing library

matejcik/lifetimehell
cepetr 2 weeks ago
parent a983183078
commit 3182c753c3

@ -49,7 +49,7 @@ impl HorizontalLine {
}
impl<'s> Shape<'s> for HorizontalLine {
fn bounds(&self, _cache: &DrawingCache<'s>) -> Rect {
fn bounds(&self) -> Rect {
let size = Offset::new(self.length, self.thickness as i16);
Rect::from_top_left_and_size(self.pos, size)
}

@ -82,7 +82,7 @@ impl LoaderCircular {
}
impl<'s> Shape<'s> for LoaderCircular {
fn bounds(&self, _cache: &DrawingCache<'s>) -> Rect {
fn bounds(&self) -> Rect {
let cells = self.cells();
if cells.is_empty() {

@ -53,7 +53,7 @@ impl LoaderSmall {
}
impl Shape<'_> for LoaderSmall {
fn bounds(&self, _cache: &DrawingCache) -> Rect {
fn bounds(&self) -> Rect {
Rect::from_top_left_and_size(self.pos, Offset::uniform(1)).expand(RADIUS + 1)
}

@ -72,7 +72,7 @@ impl LoaderStarry {
}
impl Shape<'_> for LoaderStarry {
fn bounds(&self, _cache: &DrawingCache) -> Rect {
fn bounds(&self) -> Rect {
Rect::from_top_left_and_size(self.pos, Offset::uniform(1)).expand(RADIUS + STAR_LARGE)
}

Loading…
Cancel
Save