Colorize the progress bar

This commit is contained in:
mo8it
2024-04-10 00:42:32 +02:00
parent c8d217ad50
commit 4a80bf6441
2 changed files with 79 additions and 23 deletions
+3 -3
View File
@@ -7,7 +7,7 @@ use ratatui::{
Frame,
};
use crate::{exercise::Exercise, progress_bar::progress_bar, state_file::StateFile};
use crate::{exercise::Exercise, progress_bar::progress_bar_ratatui, state_file::StateFile};
#[derive(Copy, Clone, PartialEq, Eq)]
pub enum Filter {
@@ -166,11 +166,11 @@ impl UiState {
);
frame.render_widget(
Paragraph::new(Span::raw(progress_bar(
Paragraph::new(progress_bar_ratatui(
self.progress,
self.exercises.len() as u16,
area.width,
)?))
)?)
.block(Block::default().borders(Borders::BOTTOM)),
Rect {
x: 0,