mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-01-11 22:12:53 +01:00
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:
@@ -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;
|
||||||
|
|||||||
Reference in New Issue
Block a user