Bit of a hack, change back to non-percent based for disks to prevent some jumping entries

This commit is contained in:
ClementTsang 2020-01-10 19:00:55 -05:00
parent e0f9738f5f
commit c5855e7b0a
2 changed files with 9 additions and 43 deletions

35
.vscode/settings.json vendored
View file

@ -1,35 +0,0 @@
{
"cSpell.words": [
"AHHHHHH",
"Dataset",
"Ryzen",
"Tebibyte",
"avgcpu",
"backend",
"crossterm",
"curr",
"datasets",
"dword",
"fract",
"gotop",
"gtop",
"heim",
"iowait",
"keybinds",
"macos",
"minwindef",
"noheader",
"ntdef",
"processthreadsapi",
"rustop",
"softirq",
"stime",
"sysinfo",
"termion",
"utime",
"vangelis",
"winapi",
"winnt"
],
"cSpell.language": "en,en-GB"
}

View file

@ -726,6 +726,7 @@ fn draw_disk_table<B: backend::Backend>(
)
});
let width = f64::from(draw_loc.width);
Table::new(
["Disk", "Mount", "Used", "Free", "Total", "R/s", "W/s"].iter(),
disk_rows,
@ -745,14 +746,14 @@ fn draw_disk_table<B: backend::Backend>(
.modifier(Modifier::BOLD),
)
.widths(&[
Constraint::Percentage(18),
Constraint::Percentage(14),
Constraint::Percentage(11),
Constraint::Percentage(11),
Constraint::Percentage(11),
Constraint::Percentage(11),
Constraint::Percentage(11),
Constraint::Percentage(11),
Constraint::Length((width * 0.18) as u16),
Constraint::Length((width * 0.14) as u16),
Constraint::Length((width * 0.11) as u16),
Constraint::Length((width * 0.11) as u16),
Constraint::Length((width * 0.11) as u16),
Constraint::Length((width * 0.11) as u16),
Constraint::Length((width * 0.11) as u16),
Constraint::Length((width * 0.11) as u16),
])
.render(f, draw_loc);
}