other: Clarify help menu (#800)

* other: clarify that numbers are for help menu

* bug: fix incorrect overscroll check, should be min
This commit is contained in:
Clement Tsang 2022-09-03 04:04:03 -04:00 committed by GitHub
parent 726e727de6
commit 46a2a3a52b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 6 deletions

View File

@ -333,9 +333,9 @@ impl Painter {
] ]
} else { } else {
[ [
Constraint::Percentage(20), Constraint::Percentage(15),
Constraint::Percentage(60), Constraint::Percentage(70),
Constraint::Percentage(20), Constraint::Percentage(15),
] ]
}) })
.split(vertical_dialog_chunk[1]); .split(vertical_dialog_chunk[1]);

View File

@ -1,4 +1,4 @@
use std::cmp::max; use std::cmp::{max, min};
use unicode_width::UnicodeWidthStr; use unicode_width::UnicodeWidthStr;
@ -88,7 +88,7 @@ impl Painter {
.scroll_state .scroll_state
.current_scroll_index; .current_scroll_index;
*index = max(*index, *max_scroll_index); *index = min(*index, *max_scroll_index);
} }
f.render_widget( f.render_widget(

View File

@ -219,7 +219,7 @@ pub static NORD_LIGHT_COLOUR_PALETTE: Lazy<ConfigColours> = Lazy::new(|| ConfigC
// Help text // Help text
pub const HELP_CONTENTS_TEXT: [&str; 8] = [ pub const HELP_CONTENTS_TEXT: [&str; 8] = [
"Press the corresponding numbers to jump to the section, or scroll:", "Either scroll or press the number key to go to the corresponding help menu section:",
"1 - General", "1 - General",
"2 - CPU widget", "2 - CPU widget",
"3 - Process widget", "3 - Process widget",