mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-06 11:46:41 +01:00
fix layering misalignment
This commit is contained in:
parent
7db3d2aa4c
commit
ccd905d573
1 changed files with 4 additions and 5 deletions
|
|
@ -61,11 +61,10 @@ pub trait BspAreas<E: Output, A: Content<E>, B: Content<E>> {
|
|||
}).xywh();
|
||||
match direction {
|
||||
Above | Below => {
|
||||
let x = ax.min(bx);
|
||||
let w = (ax+aw).max(bx+bw).minus(x);
|
||||
let y = ay.min(by);
|
||||
let h = (ay+ah).max(by+bh).minus(y);
|
||||
[[ax, ay, aw, ah].into(), [bx, by, bw, bh].into(), [x, y, w, h].into()]
|
||||
let [x, y, w, h] = outer.center_xy([aw.max(bw), ah.max(bh)]);
|
||||
let a = [(x + w/2.into()).minus(aw/2.into()), (y + h/2.into()).minus(ah/2.into()), aw, ah];
|
||||
let b = [(x + w/2.into()).minus(bw/2.into()), (y + h/2.into()).minus(bh/2.into()), bw, bh];
|
||||
[a.into(), b.into(), [x, y, w, h].into()]
|
||||
},
|
||||
South => {
|
||||
let [x, y, w, h] = outer.center_xy([aw.max(bw), ah + bh]);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue