summaryrefslogtreecommitdiffstats
path: root/widget/src/text_editor.rs
diff options
context:
space:
mode:
authorLibravatar rhysd <lin90162@yahoo.co.jp>2025-02-06 01:50:25 +0900
committerLibravatar rhysd <lin90162@yahoo.co.jp>2025-02-06 02:01:52 +0900
commitfcdf53afdee9cd12bf2e01c5f6e572859b9a3f96 (patch)
tree0f28b34b42e88db0dc379e3c3b8b6deb88192df2 /widget/src/text_editor.rs
parent4bbb5cbc1f8b2a0ee8e09be18071368df3ba5bbd (diff)
downloadiced-fcdf53afdee9cd12bf2e01c5f6e572859b9a3f96.tar.gz
iced-fcdf53afdee9cd12bf2e01c5f6e572859b9a3f96.tar.bz2
iced-fcdf53afdee9cd12bf2e01c5f6e572859b9a3f96.zip
Set correct text size for text in preedit window
Diffstat (limited to 'widget/src/text_editor.rs')
-rw-r--r--widget/src/text_editor.rs12
1 files changed, 8 insertions, 4 deletions
diff --git a/widget/src/text_editor.rs b/widget/src/text_editor.rs
index e685256b..df42d601 100644
--- a/widget/src/text_editor.rs
+++ b/widget/src/text_editor.rs
@@ -753,14 +753,18 @@ where
}
Update::InputMethod(update) => match update {
Ime::Toggle(is_open) => {
- state.preedit =
- is_open.then(input_method::Preedit::new);
+ state.preedit = is_open.then(|| {
+ input_method::Preedit::new(self.text_size)
+ });
shell.request_redraw();
}
Ime::Preedit { content, selection } => {
- state.preedit =
- Some(input_method::Preedit { content, selection });
+ state.preedit = Some(input_method::Preedit {
+ content,
+ selection,
+ text_size: self.text_size,
+ });
shell.request_redraw();
}