Skip to content

Commit

Permalink
Total score block
Browse files Browse the repository at this point in the history
  • Loading branch information
hlsxx committed Dec 10, 2024
1 parent ec4f20c commit 8b03c7b
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/windows/stats_window.rs
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@ impl Window for StatsWindow {
let right_widget = Layout::default()
.direction(Direction::Vertical)
.constraints(vec![
Constraint::Percentage(20),
Constraint::Percentage(80)
Constraint::Length(5),
Constraint::Percentage(100)
])
.split(chunks[1]);

Expand Down Expand Up @@ -310,7 +310,15 @@ impl StatsWindow {
]),
];

let block = Block::new()
.title(" Total score ")
.title_style(Style::new().fg(layout.get_primary_color()))
.borders(Borders::ALL)
.border_style(Style::default().fg(layout.get_primary_color()))
.border_type(BorderType::Rounded);

let p = Paragraph::new(text)
.block(block)
.style(Style::new().bg(layout.get_background_color()))
.alignment(Alignment::Left);

Expand Down

0 comments on commit 8b03c7b

Please sign in to comment.