From e2e1ac300618a06d8cc3f5216cd79ffed39eb913 Mon Sep 17 00:00:00 2001 From: ClementTsang Date: Mon, 18 May 2020 23:36:06 -0400 Subject: [PATCH] change: always highlight selected cpu --- CHANGELOG.md | 3 +++ src/canvas/widgets/cpu_graph.rs | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8b15cecd..15a42af2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,6 +20,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Average CPU is now on by _default_. You can disable it via `-a, --hide_avg_cpu` or `hide_avg_cpu = true`. +- Make highlighted CPU persist even if widget is not selected - this should help make it easier to know what CPU you are looking at + even if you aren't currently on the CPU widget. + ## [0.4.3] - 2020-05-15 ### Other diff --git a/src/canvas/widgets/cpu_graph.rs b/src/canvas/widgets/cpu_graph.rs index 2e147c11..3fcd0bef 100644 --- a/src/canvas/widgets/cpu_graph.rs +++ b/src/canvas/widgets/cpu_graph.rs @@ -260,7 +260,7 @@ impl CpuGraphWidget for Painter { } else { Some(Row::StyledData( cpu_string_row.into_iter(), - if is_on_widget && itx == offset_scroll_index { + if itx == offset_scroll_index { self.colours.currently_selected_text_style } else if itx == ALL_POSITION { self.colours.all_colour_style