summaryrefslogtreecommitdiffstats
path: root/widget
diff options
context:
space:
mode:
authorLibravatar Héctor <hector@hecrj.dev>2025-02-12 07:36:48 +0100
committerLibravatar GitHub <noreply@github.com>2025-02-12 07:36:48 +0100
commit7c1123d6c9c51b54cc25cd88f7922658a42230fb (patch)
treefc21ed7a0d0dc5bee28250f5cdd84233fbbf4557 /widget
parent89a412695af321356a6f05f9111510d35a839983 (diff)
parent7199ed0d079de5584ec0e7c8c5e8ff88cc1453e8 (diff)
downloadiced-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.rs7
-rw-r--r--widget/src/text_input.rs1
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();