diff --git a/.vscode/settings.json b/.vscode/settings.json deleted file mode 100644 index da1971ea..00000000 --- a/.vscode/settings.json +++ /dev/null @@ -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" -} diff --git a/src/canvas.rs b/src/canvas.rs index bc0eaef1..0add4b4f 100644 --- a/src/canvas.rs +++ b/src/canvas.rs @@ -726,6 +726,7 @@ fn draw_disk_table( ) }); + 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( .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); }