layout: Inline variable
Browse files at this commit4eddcef1beeff824d6eb63fc643bf2a88ab9c20fParent: 68776f11 changed file +6 -5
- src/layout/scrolling.rs +6 -5
src/layout/scrolling.rsmodified+6 -5
| @@ -3405,7 +3405,6 @@ impl<W: LayoutElement> Column<W> { | ||
| 3405 | 3405 | |
| 3406 | 3406 | let width = width.resolve(&self.options, self.working_area.size.w); |
| 3407 | 3407 | let width = f64::max(f64::min(width, max_width), min_width); |
| 3408 | - let height = self.working_area.size.h; | |
| 3409 | 3408 | |
| 3410 | 3409 | // If there are multiple windows in a column, clamp the non-auto window's height according |
| 3411 | 3410 | // to other windows' min sizes. |
| @@ -3454,10 +3453,12 @@ impl<W: LayoutElement> Column<W> { | ||
| 3454 | 3453 | } |
| 3455 | 3454 | WindowHeight::Preset(idx) => { |
| 3456 | 3455 | 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 | + }; | |
| 3461 | 3462 | |
| 3462 | 3463 | let mut window_height = window_height.round().clamp(1., 100000.); |
| 3463 | 3464 | if let Some(max) = max_non_auto_window_height { |