aboutsummaryrefslogtreecommitdiff
path: root/src/tui/ui.rs
diff options
context:
space:
mode:
authorlukeflo2025-07-04 14:41:47 +0200
committerlukeflo2025-07-04 14:41:47 +0200
commit5ebecf2ea9d0fb9c57b264d7cd1c6e92b36d30e8 (patch)
treefdccdd4ecded35feb3ca6bb441bb3d4581175f07 /src/tui/ui.rs
parent2594cf34dcf2f04f398dab7b6ecae364eb4c7d17 (diff)
downloadbibiman-5ebecf2ea9d0fb9c57b264d7cd1c6e92b36d30e8.tar.gz
bibiman-5ebecf2ea9d0fb9c57b264d7cd1c6e92b36d30e8.zip
`PopupItem::Citekey` impl
Diffstat (limited to 'src/tui/ui.rs')
-rw-r--r--src/tui/ui.rs28
1 files changed, 16 insertions, 12 deletions
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()