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> {
34053405
34063406 let width = width.resolve(&self.options, self.working_area.size.w);
34073407 let width = f64::max(f64::min(width, max_width), min_width);
3408- let height = self.working_area.size.h;
34093408
34103409 // If there are multiple windows in a column, clamp the non-auto window's height according
34113410 // to other windows' min sizes.
@@ -3454,10 +3453,12 @@ impl<W: LayoutElement> Column<W> {
34543453 }
34553454 WindowHeight::Preset(idx) => {
34563455 let preset = self.options.preset_window_heights[idx];
3457- let window_height = match resolve_preset_size(preset, &self.options, height) {
3458- ResolvedSize::Tile(h) => tile.window_height_for_tile_height(h),
3459- ResolvedSize::Window(h) => h,
3460- };
3456+ let available_height = self.working_area.size.h;
3457+ let window_height =
3458+ match resolve_preset_size(preset, &self.options, available_height) {
3459+ ResolvedSize::Tile(h) => tile.window_height_for_tile_height(h),
3460+ ResolvedSize::Window(h) => h,
3461+ };
34613462
34623463 let mut window_height = window_height.round().clamp(1., 100000.);
34633464 if let Some(max) = max_non_auto_window_height {