From 9125e04e0720990a9821ef3636aea7fce9856463 Mon Sep 17 00:00:00 2001 From: unspeaker Date: Wed, 1 Jan 2025 19:48:26 +0100 Subject: [PATCH] fix horizontal bsp --- layout/src/direction.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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()]