Set correct text size for text in preedit window

This commit is contained in:
rhysd 2025-02-06 01:50:25 +09:00
parent 4bbb5cbc1f
commit fcdf53afde
4 changed files with 25 additions and 11 deletions

View file

@ -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();
}