Skip to content

Commit

Permalink
fix: Update default frames.
Browse files Browse the repository at this point in the history
  • Loading branch information
milesj committed Dec 19, 2024
1 parent bf07c2a commit ccf6453
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 11 deletions.
6 changes: 6 additions & 0 deletions crates/console/src/console.rs
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,12 @@ impl<R: Reporter> Console<R> {

#[cfg(feature = "ui")]
pub fn set_theme(&mut self, theme: crate::theme::ConsoleTheme) {
if let Some(arc_reporter) = &mut self.reporter {
if let Some(reporter) = Arc::get_mut(arc_reporter) {
reporter.inherit_theme(theme.clone());
}
}

self.theme = theme;
}
}
Expand Down
12 changes: 1 addition & 11 deletions crates/console/src/theme.rs
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,6 @@ impl ConsoleTheme {
pub fn branded(color: Color) -> Self {
Self {
brand_color: color,
form_label_color: color,
progress_bar_color: color,
progress_loader_color: color,
..Self::default()
Expand Down Expand Up @@ -156,13 +155,4 @@ pub enum Variant {
Success,
}

const DEFAULT_FRAMES: &[&str] = &[
"▰▱▱▱▱▱▱",
"▰▰▱▱▱▱▱",
"▰▰▰▱▱▱▱",
"▰▰▰▰▱▱▱",
"▰▰▰▰▰▱▱",
"▰▰▰▰▰▰▱",
"▰▰▰▰▰▰▰",
"▰▱▱▱▱▱▱",
];
const DEFAULT_FRAMES: &[&str] = &["▏", "▎", "▍", "▌", "▋", "▊", "▉", "▊", "▋", "▌", "▍", "▎"];

0 comments on commit ccf6453

Please sign in to comment.