From 397e704d644d1bfe7736f2fdacbfe5742c7b2f9f Mon Sep 17 00:00:00 2001 From: Ivan Molodetskikh Date: Fri, 7 Feb 2025 09:36:08 +0300 Subject: layout/scrolling: Extract variable --- src/layout/scrolling.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/layout') diff --git a/src/layout/scrolling.rs b/src/layout/scrolling.rs index 8ecd0ec1..9c336e69 100644 --- a/src/layout/scrolling.rs +++ b/src/layout/scrolling.rs @@ -3439,9 +3439,11 @@ impl Column { self.width }; + let working_size = self.working_area.size; + let width = self.resolve_column_width(width); let width = f64::max(f64::min(width, max_width), min_width); - let max_tile_height = self.working_area.size.h - self.options.gaps * 2.; + let max_tile_height = working_size.h - self.options.gaps * 2.; // If there are multiple windows in a column, clamp the non-auto window's height according // to other windows' min sizes. @@ -3503,7 +3505,7 @@ impl Column { .collect::>(); let gaps_left = self.options.gaps * (self.tiles.len() + 1) as f64; - let mut height_left = self.working_area.size.h - gaps_left; + let mut height_left = working_size.h - gaps_left; let mut auto_tiles_left = self.tiles.len(); // Subtract all fixed-height tiles. -- cgit