Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature: Adds tree view #223

Merged
merged 21 commits into from
Sep 7, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Add back highlighting to CPU legend if not focused
  • Loading branch information
ClementTsang committed Sep 3, 2020
commit 6df7014edaeb2dead994940eade5d0c169d87a19
12 changes: 5 additions & 7 deletions src/canvas/widgets/cpu_graph.rs
Original file line number Diff line number Diff line change
Expand Up @@ -349,13 +349,11 @@ impl CpuGraphWidget for Painter {
get_variable_intrinsic_widths(width as u16, &width_ratios, &CPU_LEGEND_HEADER_LENS);
let intrinsic_widths = &(variable_intrinsic_results.0)[0..variable_intrinsic_results.1];

let (border_and_title_style, highlight_style) = if is_on_widget {
(
self.colours.highlighted_border_style,
self.colours.currently_selected_text_style,
)
// Note we don't set highlight_style, as it should always be shown for this widget.
let border_and_title_style = if is_on_widget {
self.colours.highlighted_border_style
} else {
(self.colours.border_style, self.colours.text_style)
self.colours.border_style
};

// Draw
Expand All @@ -367,7 +365,7 @@ impl CpuGraphWidget for Painter {
.border_style(border_and_title_style),
)
.header_style(self.colours.table_header_style)
.highlight_style(highlight_style)
.highlight_style(self.colours.currently_selected_text_style)
.widths(
&(intrinsic_widths
.iter()
Expand Down