'and then not have to worry about layout, ever'

This commit is contained in:
🪞👃🪞 2024-12-31 23:58:51 +01:00
parent 21741ebc52
commit f7e6449324
8 changed files with 74 additions and 74 deletions

View file

@ -22,7 +22,7 @@ macro_rules! transform_xy {
_ => unreachable!()
}
}
fn area (&$self, $to: <E as Engine>::Area) -> <E as Engine>::Area {
fn layout (&$self, $to: <E as Engine>::Area) -> <E as Engine>::Area {
$area
}
}
@ -31,7 +31,7 @@ macro_rules! transform_xy {
transform_xy!(self: Fill |to|{
let [x0, y0, wmax, hmax] = to.xywh();
let [x, y, w, h] = Content::area(&self.content(), to).xywh();
let [x, y, w, h] = Content::layout(&self.content(), to).xywh();
return match self {
Self::X(_) => [x0, y, wmax, h],
Self::Y(_) => [x, y0, w, hmax],