diff options
author | Clement Tsang <34804052+ClementTsang@users.noreply.github.com> | 2020-11-02 20:29:34 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-02 20:29:34 -0500 |
commit | 5df1764e9082ca8127a24003618700793baeb82e (patch) | |
tree | 387caeb9a0d3d2b519f0ec394cda1af995b6a647 /src/canvas/widgets | |
parent | 465a433d0d06457943017edba8f1760b96bbc4f0 (diff) |
bug: fix incorrect CPU colour offset (#290)
Fixes an incorrect offset affecting the CPU colour when scrolling.
Diffstat (limited to 'src/canvas/widgets')
-rw-r--r-- | src/canvas/widgets/cpu_graph.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/canvas/widgets/cpu_graph.rs b/src/canvas/widgets/cpu_graph.rs index 7c5c8de0..bce8b699 100644 --- a/src/canvas/widgets/cpu_graph.rs +++ b/src/canvas/widgets/cpu_graph.rs @@ -364,10 +364,10 @@ impl CpuGraphWidget for Painter { cpu_string_row.into_iter(), if itx == offset_scroll_index { self.colours.currently_selected_text_style - } else if itx == ALL_POSITION { + } else if itx + start_position == ALL_POSITION { self.colours.all_colour_style } else if show_avg_cpu { - if itx == AVG_POSITION { + if itx + start_position == AVG_POSITION { self.colours.avg_colour_style } else { self.colours.cpu_colour_styles[itx + start_position |