mirror of
https://github.com/ClementTsang/bottom.git
synced 2024-11-11 16:06:51 +03:00
Fix bug with autohide causing hide to break.
This commit is contained in:
parent
e5588f1606
commit
1046043138
@ -30,7 +30,9 @@ Features of bottom include:
|
||||
|
||||
- Maximizing of widgets of interest to take up the entire window.
|
||||
|
||||
- Basic mode
|
||||
- A minimal mode that focuses less on graphs and more on data, similar to [htop](https://hisham.hm/htop/).
|
||||
|
||||
- Zooming in/out to see more/less data.
|
||||
|
||||
More details about each widget and compatibility can be found [here](./docs/widgets.md).
|
||||
|
||||
|
@ -47,8 +47,10 @@ impl CpuGraphWidget for Painter {
|
||||
format!("{}s", app_state.cpu_state.display_time / 1000),
|
||||
"0s".to_string(),
|
||||
];
|
||||
|
||||
let x_axis = if app_state.app_config_fields.hide_time
|
||||
|| app_state.cpu_state.display_time_instant.is_none()
|
||||
|| (app_state.app_config_fields.autohide_time
|
||||
&& app_state.cpu_state.display_time_instant.is_none())
|
||||
{
|
||||
Axis::default().bounds([0.0, app_state.cpu_state.display_time as f64])
|
||||
} else if let Some(time) = app_state.cpu_state.display_time_instant {
|
||||
|
@ -31,7 +31,8 @@ impl MemGraphWidget for Painter {
|
||||
"0s".to_string(),
|
||||
];
|
||||
let x_axis = if app_state.app_config_fields.hide_time
|
||||
|| app_state.mem_state.display_time_instant.is_none()
|
||||
|| (app_state.app_config_fields.autohide_time
|
||||
&& app_state.mem_state.display_time_instant.is_none())
|
||||
{
|
||||
Axis::default().bounds([0.0, app_state.mem_state.display_time as f64])
|
||||
} else if let Some(time) = app_state.mem_state.display_time_instant {
|
||||
|
@ -44,7 +44,8 @@ impl NetworkGraphWidget for Painter {
|
||||
"0s".to_string(),
|
||||
];
|
||||
let x_axis = if app_state.app_config_fields.hide_time
|
||||
|| app_state.net_state.display_time_instant.is_none()
|
||||
|| (app_state.app_config_fields.autohide_time
|
||||
&& app_state.net_state.display_time_instant.is_none())
|
||||
{
|
||||
Axis::default().bounds([0.0, app_state.net_state.display_time as f64])
|
||||
} else if let Some(time) = app_state.net_state.display_time_instant {
|
||||
|
Loading…
Reference in New Issue
Block a user