Skip to content

Commit

Permalink
🚸 Lower CPU consumption and update preview
Browse files Browse the repository at this point in the history
  • Loading branch information
pyaillet committed Jan 22, 2024
1 parent 227e4a4 commit 1cf3473
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
Binary file modified doc/preview.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion doc/preview.tape
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Type "doggy"

Enter

Sleep 1s
Sleep 4s

# -- Show help screen

Expand Down
13 changes: 9 additions & 4 deletions src/components/containers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@ use crate::components::{
};

const CONTAINER_CONSTRAINTS: [Constraint; 7] = [
Constraint::Min(14),
Constraint::Max(30),
Constraint::Percentage(50),
Constraint::Min(14),
Constraint::Percentage(20),
Constraint::Percentage(20),
Constraint::Percentage(20),
Constraint::Percentage(20),
Constraint::Max(4),
Constraint::Max(5),
Constraint::Max(9),
Expand Down Expand Up @@ -513,7 +513,12 @@ impl Containers {
if let Some(mem) = stats.mem_data().next() {
let format = FormatSizeOptions::from(BINARY).decimal_places(1);
cells.push(Cell::new(format_size(*mem, format)));
} else {
cells.push(Cell::new("-".to_string()));
}
} else {
cells.push(Cell::new("-".to_string()));
cells.push(Cell::new("-".to_string()));
}
Row::new(cells)
})
Expand Down

0 comments on commit 1cf3473

Please sign in to comment.