Simplify InputMethod API with only two states
Co-authored-by: rhysd <lin90162@yahoo.co.jp> Co-authored-by: KENZ <KENZ.gelsoft@gmail.com>
This commit is contained in:
parent
97f1db3783
commit
7979125ed7
8 changed files with 113 additions and 100 deletions
|
|
@ -729,7 +729,7 @@ where
|
|||
_ => mouse::Cursor::Unavailable,
|
||||
};
|
||||
|
||||
let had_input_method = shell.input_method().is_open();
|
||||
let had_input_method = shell.input_method().is_enabled();
|
||||
|
||||
let translation =
|
||||
state.translation(self.direction, bounds, content_bounds);
|
||||
|
|
@ -750,7 +750,7 @@ where
|
|||
);
|
||||
|
||||
if !had_input_method {
|
||||
if let InputMethod::Open { position, .. } =
|
||||
if let InputMethod::Enabled { position, .. } =
|
||||
shell.input_method_mut()
|
||||
{
|
||||
*position = *position - translation;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue