blob: 5894f58325fccd145b54c0d65a53100cd6e99c44 (
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
27
28
29
30
31
32
33
34
|
use iced_widget::core::border::Radius;
use iced_widget::core::renderer::CRISP;
use iced_widget::rule::{Catalog, FillMode, Style, StyleFn};
use super::Theme;
impl Catalog for Theme {
type Class<'a> = StyleFn<'a, Self>;
fn default<'a>() -> Self::Class<'a> {
Box::new(inset)
}
fn style(&self, class: &Self::Class<'_>) -> Style {
class(self)
}
}
pub fn inset(theme: &Theme) -> Style {
Style {
color: theme.colors().outline.variant,
fill_mode: FillMode::Padded(8),
radius: Radius::default(),
snap: CRISP,
}
}
pub fn full_width(theme: &Theme) -> Style {
Style {
color: theme.colors().outline.variant,
fill_mode: FillMode::Full,
radius: Radius::default(),
snap: CRISP,
}
}
|