diff --git a/layout/src/direction.rs b/layout/src/direction.rs index 3319bf5a..8cab09c8 100644 --- a/layout/src/direction.rs +++ b/layout/src/direction.rs @@ -75,13 +75,13 @@ impl, B: Content> Bsp { [a.into(), b.into(), [x, y, w, h].into()] }, East => { - let [x, y, w, h] = outer.center_xy([aw.max(bw), ah + bh]); + let [x, y, w, h] = outer.center_xy([aw + bw, ah.max(bh)]); let a = [x, y, aw, ah]; let b = [x + aw, y, bw, bh]; [a.into(), b.into(), [x, y, w, h].into()] }, West => { - let [x, y, w, h] = outer.center_xy([aw.max(bw), ah + bh]); + let [x, y, w, h] = outer.center_xy([aw + bw, ah.max(bh)]); let a = [x + bw, y, aw, ah]; let b = [x, y, bw, bh]; [a.into(), b.into(), [x, y, w, h].into()]