diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/layout/scrolling.rs | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/src/layout/scrolling.rs b/src/layout/scrolling.rs index 73e55451..a378c461 100644 --- a/src/layout/scrolling.rs +++ b/src/layout/scrolling.rs @@ -3553,8 +3553,7 @@ impl<W: LayoutElement> Column<W> { } }; - // If there are multiple windows in a column, clamp the height according to other windows' - // min sizes. + // Clamp the height according to other windows' min sizes, or simply to working area height. let min_height_taken = self .tiles .iter() @@ -3562,12 +3561,10 @@ impl<W: LayoutElement> Column<W> { .filter(|(idx, _)| *idx != tile_idx) .map(|(_, tile)| f64::max(1., tile.min_size().h) + self.options.gaps) .sum::<f64>(); - if min_height_taken > 0. { - let height_left = - self.working_area.size.h - self.options.gaps - min_height_taken - self.options.gaps; - let height_left = f64::max(1., tile.window_height_for_tile_height(height_left)); - window_height = f64::min(height_left, window_height); - } + let height_left = + self.working_area.size.h - self.options.gaps - min_height_taken - self.options.gaps; + let height_left = f64::max(1., tile.window_height_for_tile_height(height_left)); + window_height = f64::min(height_left, window_height); // Clamp it against the window height constraints. let win = &self.tiles[tile_idx].window(); |
