blob: f686fff19d7c6c7bcdfc621f0f2c45c14d8d8dd2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
use iced_widget::core::{Background, border};
use iced_widget::progress_bar::{Catalog, Style, StyleFn};
use super::Theme;
impl Catalog for Theme {
type Class<'a> = StyleFn<'a, Self>;
fn default<'a>() -> Self::Class<'a> {
Box::new(default)
}
fn style(&self, class: &Self::Class<'_>) -> Style {
class(self)
}
}
pub fn default(theme: &Theme) -> Style {
Style {
background: Background::Color(
theme.colorscheme.secondary.secondary_container,
),
bar: Background::Color(theme.colorscheme.primary.color),
border: border::rounded(400),
}
}
|