From d8d18d3d9dd7158bec42d793763429896fd58d8e Mon Sep 17 00:00:00 2001 From: Florian Dehau Date: Thu, 27 Oct 2016 23:03:31 +0200 Subject: [PATCH] Fix layout computation --- src/layout.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/layout.rs b/src/layout.rs index 925c73f..0928750 100644 --- a/src/layout.rs +++ b/src/layout.rs @@ -202,22 +202,22 @@ pub fn split(area: &Rect, dir: &Direction, margin: u16, sizes: &[Size]) -> Vec { - if value <= area.width { + if value <= dest_area.right() { results[index].x = value; } } 1 => { - if value <= area.height { + if value <= dest_area.bottom() { results[index].y = value; } } 2 => { - if value <= area.width { + if value <= dest_area.width { results[index].width = value; } } 3 => { - if value <= area.height { + if value <= dest_area.height { results[index].height = value; } }