fix ci; fix deps breakage from upgrade

This commit is contained in:
🪞👃🪞 2024-12-30 23:08:49 +01:00
parent 6600d8fc3c
commit 7c652135ad
6 changed files with 25 additions and 38 deletions

View file

@ -136,21 +136,12 @@ transform_xy_unit!(Fixed
});
transform_xy_unit!(Shrink
|self, to|Ok(
self.content().min_size(to)?.map(|to|match *self {
Self::X(w, _) => [
if to.w() > w { to.w() - w } else { 0.into() },
to.h()
],
Self::Y(h, _) => [
to.w(),
if to.h() > h { to.h() - h } else { 0.into() }
],
Self::XY(w, h, _) => [
if to.w() > w { to.w() - w } else { 0.into() },
if to.h() > h { to.h() - h } else { 0.into() }
],
}.into())),
|self, to|Ok(self.content().min_size(to)?
.map(|wh|wh.wh())
.map(|[w, h]|[
w.minus(self.dx()).into(),
h.minus(self.dy()).into()
].into())),
|self, to|Ok(self.min_size(to.area().wh().into())?
.map(|size|to.render_in(to.area().clip(size).into(), &self.content()))
.transpose()?.unwrap_or(())));