mirror of
https://github.com/ClementTsang/bottom.git
synced 2026-09-24 11:35:38 +00:00
change: hide time legend if window gets too small
This commit is contained in:
@@ -123,6 +123,8 @@ impl CpuGraphWidget for Painter {
|
||||
cpu_widget_state.autohide_timer = None;
|
||||
Axis::default().bounds([-(cpu_widget_state.current_display_time as f64), 0.0])
|
||||
}
|
||||
} else if draw_loc.height < 7 {
|
||||
Axis::default().bounds([-(cpu_widget_state.current_display_time as f64), 0.0])
|
||||
} else {
|
||||
Axis::default()
|
||||
.bounds([-(cpu_widget_state.current_display_time as f64), 0.0])
|
||||
|
||||
@@ -44,6 +44,8 @@ impl MemGraphWidget for Painter {
|
||||
mem_widget_state.autohide_timer = None;
|
||||
Axis::default().bounds([-(mem_widget_state.current_display_time as f64), 0.0])
|
||||
}
|
||||
} else if draw_loc.height < 7 {
|
||||
Axis::default().bounds([-(mem_widget_state.current_display_time as f64), 0.0])
|
||||
} else {
|
||||
Axis::default()
|
||||
.bounds([-(mem_widget_state.current_display_time as f64), 0.0])
|
||||
|
||||
@@ -94,6 +94,8 @@ impl NetworkGraphWidget for Painter {
|
||||
Axis::default()
|
||||
.bounds([-(network_widget_state.current_display_time as f64), 0.0])
|
||||
}
|
||||
} else if draw_loc.height < 7 {
|
||||
Axis::default().bounds([-(network_widget_state.current_display_time as f64), 0.0])
|
||||
} else {
|
||||
Axis::default()
|
||||
.bounds([-(network_widget_state.current_display_time as f64), 0.0])
|
||||
|
||||
Reference in New Issue
Block a user