diff options
author | Clement Tsang <34804052+ClementTsang@users.noreply.github.com> | 2022-11-20 01:13:24 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-20 01:13:24 -0500 |
commit | 6a0bf10760537193bb527d1ac0cd4ac13133da43 (patch) | |
tree | 45a0fea744b835aae45d64b1508bf1b2a880c04d /src/canvas/widgets/process_table.rs | |
parent | fd1badaf36c376eddab502341a89dcaef810b81e (diff) |
other: some cleanup in proc widget (#903)
Diffstat (limited to 'src/canvas/widgets/process_table.rs')
-rw-r--r-- | src/canvas/widgets/process_table.rs | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/src/canvas/widgets/process_table.rs b/src/canvas/widgets/process_table.rs index a2e66da1..0c1ac693 100644 --- a/src/canvas/widgets/process_table.rs +++ b/src/canvas/widgets/process_table.rs @@ -213,21 +213,17 @@ impl Painter { // TODO: [MOUSE] Mouse support for these in search // TODO: [MOVEMENT] Movement support for these in search + let (case, whole, regex) = if self.is_mac_os { + ("Case(F1)", "Whole(F2)", "Regex(F3)") + } else { + ("Case(Alt+C)", "Whole(Alt+W)", "Regex(Alt+R)") + }; let option_text = Spans::from(vec![ - Span::styled( - format!("Case({})", if self.is_mac_os { "F1" } else { "Alt+C" }), - case_style, - ), + Span::styled(case, case_style), Span::raw(" "), - Span::styled( - format!("Whole({})", if self.is_mac_os { "F2" } else { "Alt+W" }), - whole_word_style, - ), + Span::styled(whole, whole_word_style), Span::raw(" "), - Span::styled( - format!("Regex({})", if self.is_mac_os { "F3" } else { "Alt+R" }), - regex_style, - ), + Span::styled(regex, regex_style), ]); search_text.push(Spans::from(Span::styled( |