Skip to content

Commit

Permalink
fix cpu colour in all mode
Browse files Browse the repository at this point in the history
  • Loading branch information
ClementTsang committed Feb 1, 2025
1 parent c633dcd commit fb956e2
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/canvas/widgets/cpu_graph.rs
Original file line number Diff line number Diff line change
Expand Up @@ -140,9 +140,8 @@ impl Painter {
} else if itx == ALL_POSITION {
self.styles.all_cpu_colour
} else {
let offset_position = itx - 1; // Because of the all position
self.styles.cpu_colour_styles[(offset_position - show_avg_offset)
% self.styles.cpu_colour_styles.len()]
self.styles.cpu_colour_styles
[(itx - show_avg_offset) % self.styles.cpu_colour_styles.len()]
};

GraphData::default().style(style).time(time).values(values)
Expand Down

0 comments on commit fb956e2

Please sign in to comment.