aboutsummaryrefslogtreecommitdiff
path: root/src/layout
diff options
context:
space:
mode:
authorIvan Molodetskikh <yalterz@gmail.com>2025-02-07 09:36:08 +0300
committerIvan Molodetskikh <yalterz@gmail.com>2025-02-07 10:03:38 +0300
commit397e704d644d1bfe7736f2fdacbfe5742c7b2f9f (patch)
treeb63a9dd81837465a2534b55d14d41dd0d8256cd2 /src/layout
parentacc9d3e4092a519474e9c0d5382e60143598cae1 (diff)
downloadniri-397e704d644d1bfe7736f2fdacbfe5742c7b2f9f.tar.gz
niri-397e704d644d1bfe7736f2fdacbfe5742c7b2f9f.tar.bz2
niri-397e704d644d1bfe7736f2fdacbfe5742c7b2f9f.zip
layout/scrolling: Extract variable
Diffstat (limited to 'src/layout')
-rw-r--r--src/layout/scrolling.rs6
1 files changed, 4 insertions, 2 deletions
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<W: LayoutElement> Column<W> {
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<W: LayoutElement> Column<W> {
.collect::<Vec<_>>();
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.