Skip to content

Commit 8b03c7b

Browse files
committed
Total score block
1 parent ec4f20c commit 8b03c7b

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

src/windows/stats_window.rs

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,8 @@ impl Window for StatsWindow {
8686
let right_widget = Layout::default()
8787
.direction(Direction::Vertical)
8888
.constraints(vec![
89-
Constraint::Percentage(20),
90-
Constraint::Percentage(80)
89+
Constraint::Length(5),
90+
Constraint::Percentage(100)
9191
])
9292
.split(chunks[1]);
9393

@@ -310,7 +310,15 @@ impl StatsWindow {
310310
]),
311311
];
312312

313+
let block = Block::new()
314+
.title(" Total score ")
315+
.title_style(Style::new().fg(layout.get_primary_color()))
316+
.borders(Borders::ALL)
317+
.border_style(Style::default().fg(layout.get_primary_color()))
318+
.border_type(BorderType::Rounded);
319+
313320
let p = Paragraph::new(text)
321+
.block(block)
314322
.style(Style::new().bg(layout.get_background_color()))
315323
.alignment(Alignment::Left);
316324

0 commit comments

Comments
 (0)