mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-06 11:46:41 +01:00
fix ci; fix deps breakage from upgrade
This commit is contained in:
parent
6600d8fc3c
commit
7c652135ad
6 changed files with 25 additions and 38 deletions
|
|
@ -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(())));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue