aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorIvan Molodetskikh <yalterz@gmail.com>2025-02-01 13:04:10 +0300
committerIvan Molodetskikh <yalterz@gmail.com>2025-02-01 13:05:07 +0300
commit4eddcef1beeff824d6eb63fc643bf2a88ab9c20f (patch)
tree603efc4c9a10232239c6bfe991a70dc457318ee5 /src
parent68776f1cee9cda05755347068604ba066b228a0e (diff)
downloadniri-4eddcef1beeff824d6eb63fc643bf2a88ab9c20f.tar.gz
niri-4eddcef1beeff824d6eb63fc643bf2a88ab9c20f.tar.bz2
niri-4eddcef1beeff824d6eb63fc643bf2a88ab9c20f.zip
layout: Inline variable
Diffstat (limited to 'src')
-rw-r--r--src/layout/scrolling.rs11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/layout/scrolling.rs b/src/layout/scrolling.rs
index 6e56212c..d5b1ece2 100644
--- a/src/layout/scrolling.rs
+++ b/src/layout/scrolling.rs
@@ -3405,7 +3405,6 @@ impl<W: LayoutElement> Column<W> {
let width = width.resolve(&self.options, self.working_area.size.w);
let width = f64::max(f64::min(width, max_width), min_width);
- let height = self.working_area.size.h;
// If there are multiple windows in a column, clamp the non-auto window's height according
// to other windows' min sizes.
@@ -3454,10 +3453,12 @@ impl<W: LayoutElement> Column<W> {
}
WindowHeight::Preset(idx) => {
let preset = self.options.preset_window_heights[idx];
- let window_height = match resolve_preset_size(preset, &self.options, height) {
- ResolvedSize::Tile(h) => tile.window_height_for_tile_height(h),
- ResolvedSize::Window(h) => h,
- };
+ let available_height = self.working_area.size.h;
+ let window_height =
+ match resolve_preset_size(preset, &self.options, available_height) {
+ ResolvedSize::Tile(h) => tile.window_height_for_tile_height(h),
+ ResolvedSize::Window(h) => h,
+ };
let mut window_height = window_height.round().clamp(1., 100000.);
if let Some(max) = max_non_auto_window_height {