diff options
author | 2025-02-12 08:46:35 +0100 | |
---|---|---|
committer | 2025-02-12 08:46:35 +0100 | |
commit | 7979125ed793918dd4a0e5a1ddec8d17bffbd5bf (patch) | |
tree | 6633f5f9bf45d4c7378afb1480617a7a247d0a89 /widget/src/scrollable.rs | |
parent | 97f1db3783dca5a4f60a9f89668613de4dfe9edd (diff) | |
download | iced-7979125ed793918dd4a0e5a1ddec8d17bffbd5bf.tar.gz iced-7979125ed793918dd4a0e5a1ddec8d17bffbd5bf.tar.bz2 iced-7979125ed793918dd4a0e5a1ddec8d17bffbd5bf.zip |
Simplify `InputMethod` API with only two states
Co-authored-by: rhysd <lin90162@yahoo.co.jp>
Co-authored-by: KENZ <KENZ.gelsoft@gmail.com>
Diffstat (limited to 'widget/src/scrollable.rs')
-rw-r--r-- | widget/src/scrollable.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/widget/src/scrollable.rs b/widget/src/scrollable.rs index fe71fd6b..0cf75c04 100644 --- a/widget/src/scrollable.rs +++ b/widget/src/scrollable.rs @@ -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; |