diff options
author | 2023-09-19 20:48:50 +0200 | |
---|---|---|
committer | 2023-09-19 20:48:50 +0200 | |
commit | f806d001e6fb44b5a45029ca257261e6e0d4d4b2 (patch) | |
tree | 4a9292fde7f8db76915d3596d326eb71ff7b92a9 /core/src/text | |
parent | c0a141ab026f5686d6bd92c8807b174396cb9105 (diff) | |
download | iced-f806d001e6fb44b5a45029ca257261e6e0d4d4b2.tar.gz iced-f806d001e6fb44b5a45029ca257261e6e0d4d4b2.tar.bz2 iced-f806d001e6fb44b5a45029ca257261e6e0d4d4b2.zip |
Introduce new `iced_highlighter` subcrate
Diffstat (limited to 'core/src/text')
-rw-r--r-- | core/src/text/highlighter.rs | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/core/src/text/highlighter.rs b/core/src/text/highlighter.rs index b462d083..9a9cff89 100644 --- a/core/src/text/highlighter.rs +++ b/core/src/text/highlighter.rs @@ -52,8 +52,17 @@ impl Highlighter for PlainText { } } -#[derive(Debug, Clone, Copy)] +#[derive(Debug, Clone, Copy, PartialEq)] pub struct Format<Font> { pub color: Option<Color>, pub font: Option<Font>, } + +impl<Font> Default for Format<Font> { + fn default() -> Self { + Self { + color: None, + font: None, + } + } +} |