fix: heading section help margin

This commit is contained in:
Jack Wills
2024-07-27 11:07:28 +00:00
parent 068e4025a5
commit 0e927aae17
+6 -5
View File
@@ -560,7 +560,7 @@ pub fn heading_bar(
let splits = if data.has_containers {
vec![
Constraint::Max(4),
Constraint::Min(column_width.try_into().unwrap_or_default()),
Constraint::Max(column_width.try_into().unwrap_or_default()),
Constraint::Max(info_width.try_into().unwrap_or_default()),
]
} else {
@@ -2379,7 +2379,7 @@ mod tests {
assert_eq!(
result_cell.fg,
match result_cell_index {
(4..=124) => Color::Black,
(4..=121) => Color::Black,
_ => Color::White,
}
);
@@ -2411,7 +2411,7 @@ mod tests {
assert_eq!(
result_cell.fg,
match result_cell_index {
(4..=64) => Color::Black,
(4..=61) => Color::Black,
_ => Color::White,
}
);
@@ -2426,6 +2426,7 @@ mod tests {
let mut setup = test_setup(w, h, true, true);
let mut fd = FrameData::from((setup.app_data.lock(), setup.gui_state.lock()));
// Actual test, used for each header and sorted type
let mut test =
|expected: &[&str], range: RangeInclusive<usize>, x: (Header, SortedOrder)| {
fd.sorted_by = Some(x);
@@ -2446,7 +2447,7 @@ mod tests {
assert_eq!(
result_cell.fg,
match result_cell_index {
0..=3 | 125..=139 => Color::White,
0..=3 | 122..=139 => Color::White,
// given range | help section
x if range.contains(&x) => Color::Gray,
_ => Color::Black,
@@ -2511,7 +2512,7 @@ mod tests {
assert_eq!(
result_cell.fg,
match result_cell_index {
(4..=124) => Color::Black,
(4..=121) => Color::Black,
_ => Color::White,
}
);