blob: e43300575f1ab174181fcce9ac39a570945e7c69 (
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
|
use iced_widget::core::border::Radius;
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.colorscheme.outline.variant,
fill_mode: FillMode::Padded(8),
width: 1,
radius: Radius::default(),
}
}
pub fn full_width(theme: &Theme) -> Style {
Style {
color: theme.colorscheme.outline.variant,
fill_mode: FillMode::Full,
width: 1,
radius: Radius::default(),
}
}
|