fix(wm): consider window count when calculating scrolling column width

This commit fixes the stupidest of stupid bugs. Column width
calculations on the Scrolling layout should take the number of windows
into account, especially when lower than the configured column count.
This commit is contained in:
LGUG2Z
2026-01-01 13:07:16 -08:00
parent 6cef8d9ef6
commit 51e1337f40

View File

@@ -49,7 +49,7 @@ impl Arrangement for DefaultLayout {
.and_then(|o| o.scrolling.map(|s| s.columns)) .and_then(|o| o.scrolling.map(|s| s.columns))
.unwrap_or(3); .unwrap_or(3);
let column_width = area.right / column_count as i32; let column_width = area.right / column_count.min(len) as i32;
let mut layouts = Vec::with_capacity(len); let mut layouts = Vec::with_capacity(len);
let visible_columns = area.right / column_width; let visible_columns = area.right / column_width;