From 949c03e42f403ff491c32e5ac2ec7465c25bc975 Mon Sep 17 00:00:00 2001 From: Klesti Selimaj Date: Tue, 14 Jul 2026 11:23:09 -0400 Subject: [PATCH] Fix curr --- pulse-ui/src/layout.rs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pulse-ui/src/layout.rs b/pulse-ui/src/layout.rs index 7fda39c..9a2f7c6 100644 --- a/pulse-ui/src/layout.rs +++ b/pulse-ui/src/layout.rs @@ -43,23 +43,25 @@ impl LayoutItem { for item in items { let size = item.get_size(); + let unit_alloc = size.get(allocation, remaining, total_weight); + let item_alloc = if is_row { Rect { width: alloc.width, - height: size.get(allocation, remaining, total_weight), + height: unit_alloc, x: alloc.x, y: curr, } } else { Rect { - width: size.get(allocation, remaining, total_weight), + width: unit_alloc, height: alloc.height, x: curr, y: alloc.y, } }; - curr += item_alloc.height; + curr += unit_alloc; item.allocate(&item_alloc, layout);