bug: fix incorrect CPU colour offset (#290)

Fixes an incorrect offset affecting the CPU colour when scrolling.
This commit is contained in:
Clement Tsang 2020-11-02 20:29:34 -05:00 committed by GitHub
parent 465a433d0d
commit 5df1764e90
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -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