From c83809adb907498ba2a573ec9fb50936601ac8fc Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Mon, 3 Feb 2025 02:33:40 +0100 Subject: Implement basic IME selection in `Preedit` overlay --- core/src/text.rs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'core/src/text.rs') diff --git a/core/src/text.rs b/core/src/text.rs index c144fd24..8dde9e21 100644 --- a/core/src/text.rs +++ b/core/src/text.rs @@ -270,6 +270,23 @@ pub struct Span<'a, Link = (), Font = crate::Font> { pub strikethrough: bool, } +impl Default for Span<'_, Link, Font> { + fn default() -> Self { + Self { + text: Cow::default(), + size: None, + line_height: None, + font: None, + color: None, + link: None, + highlight: None, + padding: Padding::default(), + underline: false, + strikethrough: false, + } + } +} + /// A text highlight. #[derive(Debug, Clone, Copy, PartialEq)] pub struct Highlight { -- cgit