diff --git a/CHANGELOG.md b/CHANGELOG.md index eb4bf6c6..b6a12b28 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -31,6 +31,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - [#391](https://github.com/ClementTsang/bottom/pull/391): Show degree symbol on Celsius and Fahrenheit. +## Bug Fixes + +- [#416](https://github.com/ClementTsang/bottom/pull/416): Fixes grouped vs ungrouped modes in the processes widget having inconsistent spacing. + ## [0.5.7] - 2021-01-30 ## Bug Fixes diff --git a/src/canvas/widgets/process_table.rs b/src/canvas/widgets/process_table.rs index fa5f3393..f655b2c1 100644 --- a/src/canvas/widgets/process_table.rs +++ b/src/canvas/widgets/process_table.rs @@ -52,7 +52,7 @@ static PROCESS_HEADERS_SOFT_WIDTH_MAX_GROUPED_COMMAND: Lazy>> = static PROCESS_HEADERS_SOFT_WIDTH_MAX_GROUPED_TREE: Lazy>> = Lazy::new(|| vec![None, Some(0.5), None, None, None, None, None, None]); static PROCESS_HEADERS_SOFT_WIDTH_MAX_GROUPED_ELSE: Lazy>> = - Lazy::new(|| vec![None, Some(0.4), None, None, None, None, None, None]); + Lazy::new(|| vec![None, Some(0.3), None, None, None, None, None, None]); static PROCESS_HEADERS_SOFT_WIDTH_MAX_NO_GROUP_COMMAND: Lazy>> = Lazy::new(|| { vec![ @@ -356,6 +356,7 @@ impl ProcessTableWidget for Painter { .iter() .map(|entry| UnicodeWidthStr::width(entry.as_str()) as u16) .collect::>(); + let soft_widths_min = column_widths .iter() .map(|width| Some(*width))