From 5ebecf2ea9d0fb9c57b264d7cd1c6e92b36d30e8 Mon Sep 17 00:00:00 2001 From: lukeflo Date: Fri, 4 Jul 2025 14:41:47 +0200 Subject: `PopupItem::Citekey` impl --- src/tui/ui.rs | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) (limited to 'src/tui/ui.rs') diff --git a/src/tui/ui.rs b/src/tui/ui.rs index 2c30154..0a34e51 100644 --- a/src/tui/ui.rs +++ b/src/tui/ui.rs @@ -281,18 +281,22 @@ pub fn render_popup(app: &mut App, cfg: &BibiConfig, frame: &mut Frame) { .iter() .map( |(mes, obj, i)| { - let style = match i { - PopupItem::Bibfile => Style::new().fg(cfg.colors.entry_color), - PopupItem::Entryfile => Style::new().fg(cfg.colors.file_color), - PopupItem::Notefile => Style::new().fg(cfg.colors.note_color), - PopupItem::Link => Style::new().fg(cfg.colors.link_color), - PopupItem::Default => Style::new(), - PopupItem::None => Style::new(), + let style: Color = match i { + PopupItem::Bibfile => cfg.colors.entry_color, + PopupItem::Citekey => cfg.colors.entry_color, + PopupItem::Entryfile => cfg.colors.file_color, + PopupItem::Notefile => cfg.colors.note_color, + PopupItem::Link => cfg.colors.link_color, + PopupItem::Default => cfg.colors.main_text_color, + PopupItem::None => cfg.colors.main_text_color, }; - ListItem::from(Line::from(vec![ - Span::styled(mes, style.bold()), - Span::raw(obj), - ])) + ListItem::from( + Line::from(vec![ + Span::styled(mes, Style::new().bold()), + Span::raw(obj), + ]) + .fg(style), + ) }, // ListItem::from(mes.to_owned() + obj) ) .collect(); @@ -325,7 +329,7 @@ pub fn render_popup(app: &mut App, cfg: &BibiConfig, frame: &mut Frame) { .bg(cfg.colors.popup_bg_color), ) .border_set(symbols::border::THICK) - .border_style(Style::new().fg(cfg.colors.keyword_color)); + .border_style(Style::new().fg(cfg.colors.popup_fg_color)); let list = List::new(list_items).block(block).highlight_style( Style::new() -- cgit v1.2.3