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+6 -5
@@ -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,10 +3453,12 @@ 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;
3458- ResolvedSize::Tile(h) => tile.window_height_for_tile_height(h),3457+ let window_height =
3459- ResolvedSize::Window(h) => h,3458+ match resolve_preset_size(preset, &self.options, available_height) {
3460- };3459+ ResolvedSize::Tile(h) => tile.window_height_for_tile_height(h),
3460+ ResolvedSize::Window(h) => h,
3461+ };
3461 3462
3462 let mut window_height = window_height.round().clamp(1., 100000.);3463 let mut window_height = window_height.round().clamp(1., 100000.);
3463 if let Some(max) = max_non_auto_window_height {3464 if let Some(max) = max_non_auto_window_height {