diff options
Diffstat (limited to 'crates')
| -rw-r--r-- | crates/material_theme/Cargo.toml | 6 | ||||
| -rw-r--r-- | crates/material_theme/src/lib.rs | 2 | ||||
| -rw-r--r-- | crates/material_theme/src/markdown.rs | 10 |
3 files changed, 16 insertions, 2 deletions
diff --git a/crates/material_theme/Cargo.toml b/crates/material_theme/Cargo.toml index 58c5e0c..0cfa571 100644 --- a/crates/material_theme/Cargo.toml +++ b/crates/material_theme/Cargo.toml @@ -13,10 +13,12 @@ rust-version = "1.85" [features] default = [] -# Provides support for animating with `iced_anim` +# Provides support for animating with `iced_anim`. animate = ["dep:iced_anim"] -# Provides support for `iced_dialog` +# Provides support for `iced_dialog`. dialog = ["dep:iced_dialog"] +# Provides support for the markdown widget. +markdown = ["iced_widget/markdown"] [dependencies] iced_widget = "0.14.0-dev" diff --git a/crates/material_theme/src/lib.rs b/crates/material_theme/src/lib.rs index 2440538..e7ff343 100644 --- a/crates/material_theme/src/lib.rs +++ b/crates/material_theme/src/lib.rs @@ -9,6 +9,8 @@ pub mod checkbox; pub mod container; #[cfg(feature = "dialog")] pub mod dialog; +#[cfg(feature = "markdown")] +pub mod markdown; pub mod menu; pub mod pick_list; pub mod scrollable; diff --git a/crates/material_theme/src/markdown.rs b/crates/material_theme/src/markdown.rs new file mode 100644 index 0000000..bc14ffe --- /dev/null +++ b/crates/material_theme/src/markdown.rs @@ -0,0 +1,10 @@ +use iced_widget::markdown::Catalog; + +use super::{Theme, container}; + +impl Catalog for Theme { + fn code_block<'a>() -> <Self as iced_widget::container::Catalog>::Class<'a> + { + Box::new(container::surface_container_highest) + } +} |
