mirror of
https://github.com/niri-wm/niri.git
synced 2026-06-23 02:05:33 +07:00
layout: Inline variable
This commit is contained in:
@@ -3405,7 +3405,6 @@ impl<W: LayoutElement> Column<W> {
|
|||||||
|
|
||||||
let width = width.resolve(&self.options, self.working_area.size.w);
|
let width = width.resolve(&self.options, self.working_area.size.w);
|
||||||
let width = f64::max(f64::min(width, max_width), min_width);
|
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
|
// If there are multiple windows in a column, clamp the non-auto window's height according
|
||||||
// to other windows' min sizes.
|
// to other windows' min sizes.
|
||||||
@@ -3454,7 +3453,9 @@ impl<W: LayoutElement> Column<W> {
|
|||||||
}
|
}
|
||||||
WindowHeight::Preset(idx) => {
|
WindowHeight::Preset(idx) => {
|
||||||
let preset = self.options.preset_window_heights[idx];
|
let preset = self.options.preset_window_heights[idx];
|
||||||
let window_height = match resolve_preset_size(preset, &self.options, height) {
|
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::Tile(h) => tile.window_height_for_tile_height(h),
|
||||||
ResolvedSize::Window(h) => h,
|
ResolvedSize::Window(h) => h,
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user