forge
Explore
Log in

Don't you dare go Hollow

layout: Inline variable

Browse files at this commit

4eddcef1beeff824d6eb63fc643bf2a88ab9c20fIvan MolodetskikhParent: 68776f1
src/layout/scrolling.rsmodified+3 -2
@@ -3405,7 +3405,6 @@ impl<W: LayoutElement> Column<W> {
3405 3405
3406 let width = width.resolve(&self.options, self.working_area.size.w);3406 let width = width.resolve(&self.options, self.working_area.size.w);
3407 let width = f64::max(f64::min(width, max_width), min_width);3407 let width = f64::max(f64::min(width, max_width), min_width);
3408- let height = self.working_area.size.h;
3409 3408
3410 // If there are multiple windows in a column, clamp the non-auto window's height according3409 // If there are multiple windows in a column, clamp the non-auto window's height according
3411 // to other windows' min sizes.3410 // to other windows' min sizes.
@@ -3454,7 +3453,9 @@ impl<W: LayoutElement> Column<W> {
3454 }3453 }
3455 WindowHeight::Preset(idx) => {3454 WindowHeight::Preset(idx) => {
3456 let preset = self.options.preset_window_heights[idx];3455 let preset = self.options.preset_window_heights[idx];
3457- let window_height = match resolve_preset_size(preset, &self.options, height) {3456+ let available_height = self.working_area.size.h;
3457+ let window_height =
3458+ match resolve_preset_size(preset, &self.options, available_height) {
3458 ResolvedSize::Tile(h) => tile.window_height_for_tile_height(h),3459 ResolvedSize::Tile(h) => tile.window_height_for_tile_height(h),
3459 ResolvedSize::Window(h) => h,3460 ResolvedSize::Window(h) => h,
3460 };3461 };