diff options
Diffstat (limited to 'src/tui/popup.rs')
| -rw-r--r-- | src/tui/popup.rs | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/src/tui/popup.rs b/src/tui/popup.rs index 4ef9fc3..f226429 100644 --- a/src/tui/popup.rs +++ b/src/tui/popup.rs @@ -16,12 +16,12 @@ ///// use ratatui::{ - style::{Color, Stylize}, + style::Stylize, text::{Line, Span, Text}, widgets::ListState, }; -use crate::cliargs::CLIArgs; +use crate::config::BibiConfig; #[derive(Debug)] pub enum PopupKind { @@ -47,7 +47,7 @@ pub struct PopupArea { } impl PopupArea { - pub fn popup_help<'a>(args: &CLIArgs) -> Text<'a> { + pub fn popup_help<'a>(cfg: &BibiConfig) -> Text<'a> { let help = [ ("General", "first"), ("TAB: ", "Toggle areas (Entries, Keywords)"), @@ -89,22 +89,16 @@ impl PopupArea { for (keys, help) in help { if help == "first" { helptext.push(Line::from( - Span::raw(keys) - .bold() - .fg(Color::Indexed(args.colors.main_text_color)), + Span::raw(keys).bold().fg(cfg.colors.main_text_color), )) } else if help == "sub" { helptext.push(Line::from("")); helptext.push(Line::from( - Span::raw(keys) - .bold() - .fg(Color::Indexed(args.colors.main_text_color)), + Span::raw(keys).bold().fg(cfg.colors.main_text_color), )) } else { helptext.push(Line::from(vec![ - Span::raw(keys) - .bold() - .fg(Color::Indexed(args.colors.keyword_color)), + Span::raw(keys).bold().fg(cfg.colors.main_text_color), Span::raw(help), ])) } |
