aboutsummaryrefslogtreecommitdiff
path: root/src/tui/ui.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/tui/ui.rs')
-rw-r--r--src/tui/ui.rs39
1 files changed, 19 insertions, 20 deletions
diff --git a/src/tui/ui.rs b/src/tui/ui.rs
index ac44d09..3c83935 100644
--- a/src/tui/ui.rs
+++ b/src/tui/ui.rs
@@ -580,7 +580,7 @@ pub fn render_entrytable(app: &mut App, cfg: &BibiConfig, frame: &mut Frame, rec
.bg(cfg.colors.bar_bg_color);
let header = Row::new(vec![
- // Cell::from(Line::from("")).bg(cfg.colors.bar_bg_color),
+ Cell::from(Line::from("")).bg(cfg.colors.bar_bg_color),
Cell::from(
Line::from(vec![{ Span::raw("Author") }, {
if let Some(EntryTableColumn::Authors) =
@@ -704,21 +704,30 @@ pub fn render_entrytable(app: &mut App, cfg: &BibiConfig, frame: &mut Frame, rec
let mut symbol_vec = vec![];
if let Some(f) = &item.symbols[0] {
- symbol_vec.push(Span::styled(f, Style::new().fg(cfg.colors.file_color)));
+ symbol_vec.push(Span::styled(
+ f,
+ Style::new().fg(cfg.colors.file_color).bold(),
+ ));
}
if let Some(l) = &item.symbols[1] {
- symbol_vec.push(Span::styled(l, Style::new().fg(cfg.colors.link_color)));
+ symbol_vec.push(Span::styled(
+ l,
+ Style::new().fg(cfg.colors.link_color).bold(),
+ ));
}
if let Some(n) = &item.symbols[2] {
- symbol_vec.push(Span::styled(n, Style::new().fg(cfg.colors.note_color)))
+ symbol_vec.push(Span::styled(
+ n,
+ Style::new().fg(cfg.colors.note_color).bold(),
+ ))
}
let row = Row::new(vec![
+ Cell::from(Line::from(symbol_vec)),
Cell::from(Line::from(item.authors)),
Cell::from(Line::from(item.title)),
Cell::from(Line::from(item.year)),
Cell::from(Line::from(item.pubtype)),
- Cell::from(Line::from(symbol_vec)),
]);
// let row = item
@@ -738,6 +747,11 @@ pub fn render_entrytable(app: &mut App, cfg: &BibiConfig, frame: &mut Frame, rec
let entry_table = Table::new(
rows,
[
+ Constraint::Length(
+ (cfg.general.file_symbol.chars().count()
+ + cfg.general.link_symbol.chars().count()
+ + cfg.general.note_symbol.chars().count()) as u16,
+ ),
Constraint::Percentage(20),
Constraint::Fill(1),
Constraint::Length(
@@ -750,12 +764,6 @@ pub fn render_entrytable(app: &mut App, cfg: &BibiConfig, frame: &mut Frame, rec
},
),
Constraint::Percentage(10),
- Constraint::Length(
- (cfg.general.file_symbol.chars().count()
- + cfg.general.link_symbol.chars().count()
- + cfg.general.note_symbol.chars().count()
- + 1) as u16,
- ),
],
)
.block(block)
@@ -917,15 +925,6 @@ pub fn render_selected_item(app: &mut App, cfg: &BibiConfig, frame: &mut Frame,
),
]));
}
- // if cur_entry.filepath.is_some() {
- // lines.push(Line::from(vec![
- // Span::styled("File: ", style_value),
- // Span::styled(
- // cur_entry.filepath().to_string_lossy(),
- // Style::new().fg(cfg.colors.main_text_color),
- // ),
- // ]));
- // }
lines.push(Line::from(""));
lines.push(Line::from(vec![Span::styled(
cur_entry.abstract_text.clone(),