mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-11-13 12:23:38 +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:
1 parent
6cef8d9ef6
commit
51e1337f40
1 file changed
+1
-1
@@ -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