fix(widget): impl Catalog for qr_code
This commit is contained in:
parent
a58c73334e
commit
d79faab789
1 changed files with 16 additions and 0 deletions
|
|
@ -1478,3 +1478,19 @@ impl iced_widget::markdown::Catalog for Theme {
|
|||
})
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(feature = "qr_code")]
|
||||
impl iced_widget::qr_code::Catalog for Theme {
|
||||
type Class<'a> = iced_widget::qr_code::StyleFn<'a, Self>;
|
||||
|
||||
fn default<'a>() -> Self::Class<'a> {
|
||||
Box::new(|_theme| iced_widget::qr_code::Style {
|
||||
cell: Color::BLACK,
|
||||
background: Color::WHITE,
|
||||
})
|
||||
}
|
||||
|
||||
fn style(&self, class: &Self::Class<'_>) -> iced_widget::qr_code::Style {
|
||||
class(self)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue