From 87d1c0a8111fddb1f2acf64e7ad72c353c363540 Mon Sep 17 00:00:00 2001 From: facile pop culture reference Date: Thu, 17 Sep 2026 16:01:39 +0300 Subject: [PATCH] fix underflows --- src/layout/azimuth.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/layout/azimuth.rs b/src/layout/azimuth.rs index 15c54ef..c697444 100644 --- a/src/layout/azimuth.rs +++ b/src/layout/azimuth.rs @@ -214,19 +214,19 @@ pub fn bar_areas <'a, S: Screen> ( Ok(match split { Split::South => ( Some(XYWH(x0, y0, w0, n)), - Some(XYWH(x0, y0 + n, w0, h0 - n)), + Some(XYWH(x0, y0 + n, w0, h0.minus(n))), ), Split::East => ( Some(XYWH(x0, y0, n, h0)), - Some(XYWH(x0 + n, y0, w0 - n, h0)), + Some(XYWH(x0 + n, y0, w0.minus(n), h0)), ), Split::North => ( - Some(XYWH(x0, y0 + h0 - n, w0, n)), - Some(XYWH(x0, y0, w0, h0 - n)), + Some(XYWH(x0, (y0 + h0).minus(n), w0, n)), + Some(XYWH(x0, y0, w0, h0.minus(n))), ), Split::West => ( - Some(XYWH(x0 + w0 - n, y0, n, h0)), - Some(XYWH(x0, y0, w0 - n, h0)), + Some(XYWH((x0 + w0).minus(n), y0, n, h0)), + Some(XYWH(x0, y0, w0.minus(n), h0)), ), Split::Above | Split::Below => ( Some(XYWH(x0, y0, w0, h0)),