diff options
author | 2025-02-12 07:36:48 +0100 | |
---|---|---|
committer | 2025-02-12 07:36:48 +0100 | |
commit | 7c1123d6c9c51b54cc25cd88f7922658a42230fb (patch) | |
tree | fc21ed7a0d0dc5bee28250f5cdd84233fbbf4557 /widget | |
parent | 89a412695af321356a6f05f9111510d35a839983 (diff) | |
parent | 7199ed0d079de5584ec0e7c8c5e8ff88cc1453e8 (diff) | |
download | iced-7c1123d6c9c51b54cc25cd88f7922658a42230fb.tar.gz iced-7c1123d6c9c51b54cc25cd88f7922658a42230fb.tar.bz2 iced-7c1123d6c9c51b54cc25cd88f7922658a42230fb.zip |
Merge pull request #2790 from rhysd/adjust-preedit-size
Set correct text size for preedit window
Diffstat (limited to 'widget')
-rw-r--r-- | widget/src/text_editor.rs | 7 | ||||
-rw-r--r-- | widget/src/text_input.rs | 1 |
2 files changed, 6 insertions, 2 deletions
diff --git a/widget/src/text_editor.rs b/widget/src/text_editor.rs index e685256b..ce5da9ef 100644 --- a/widget/src/text_editor.rs +++ b/widget/src/text_editor.rs @@ -759,8 +759,11 @@ where 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(); } diff --git a/widget/src/text_input.rs b/widget/src/text_input.rs index 7be5bbd9..37691e73 100644 --- a/widget/src/text_input.rs +++ b/widget/src/text_input.rs @@ -1273,6 +1273,7 @@ where state.is_ime_open = Some(input_method::Preedit { content: content.to_owned(), selection: selection.clone(), + text_size: self.size, }); shell.request_redraw(); |