mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-07 12:16:42 +01:00
'and then not have to worry about layout, ever'
This commit is contained in:
parent
21741ebc52
commit
f7e6449324
8 changed files with 74 additions and 74 deletions
|
|
@ -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],
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue