diff options
author | Clement Tsang <34804052+ClementTsang@users.noreply.github.com> | 2020-08-15 17:35:49 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-15 20:35:49 -0400 |
commit | f3897f0538f90c682b96bc340c3c05e80be10b2d (patch) | |
tree | f24673d4d5702e48b9d3d1889f7498c97ac238a1 /src/canvas/widgets/cpu_graph.rs | |
parent | 84f63f2f8306382dbf5cab819589161bf0b7c093 (diff) |
feature: Allow sorting by any column
This feature allows any column to be sortable.
This also adds:
- Inverting sort for current column with `I`
- Invoking a sort widget with `s` or `F6`. Close with same key or esc.
And:
- A bugfix in regards the basic menu and battery widget
- A lot of refactoring
Diffstat (limited to 'src/canvas/widgets/cpu_graph.rs')
-rw-r--r-- | src/canvas/widgets/cpu_graph.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/canvas/widgets/cpu_graph.rs b/src/canvas/widgets/cpu_graph.rs index 097d91b8..a01b7f5f 100644 --- a/src/canvas/widgets/cpu_graph.rs +++ b/src/canvas/widgets/cpu_graph.rs @@ -3,7 +3,7 @@ use std::borrow::Cow; use std::cmp::max; use crate::{ - app::App, + app::{layout_manager::WidgetDirection, App}, canvas::{ drawing_utils::{get_start_position, get_variable_intrinsic_widths}, Painter, @@ -57,9 +57,9 @@ impl CpuGraphWidget for Painter { // Skip drawing legend if app_state.current_widget.widget_id == (widget_id + 1) { if app_state.app_config_fields.left_legend { - app_state.move_widget_selection_right(); + app_state.move_widget_selection(&WidgetDirection::Right); } else { - app_state.move_widget_selection_left(); + app_state.move_widget_selection(&WidgetDirection::Left); } } self.draw_cpu_graph(f, app_state, draw_loc, widget_id); |