diff options
| author | 2024-02-15 02:57:52 +0100 | |
|---|---|---|
| committer | 2024-02-15 02:57:52 +0100 | |
| commit | 84cc9f130b4e29219d47db42cdb76548b054c66b (patch) | |
| tree | 5758716b7ca1a35e589969efd9537f5e56dd1e27 /widget/src/text_input.rs | |
| parent | 5827023ccc3f80012b17dbfe778fbd8b63186c99 (diff) | |
| parent | 777e2e34f50c440f59d9a407f75be80fbbfaccae (diff) | |
| download | iced-84cc9f130b4e29219d47db42cdb76548b054c66b.tar.gz iced-84cc9f130b4e29219d47db42cdb76548b054c66b.tar.bz2 iced-84cc9f130b4e29219d47db42cdb76548b054c66b.zip  | |
Merge pull request #2253 from iced-rs/improve-ergonomics
Improve some widget ergonomics
Diffstat (limited to 'widget/src/text_input.rs')
| -rw-r--r-- | widget/src/text_input.rs | 8 | 
1 files changed, 4 insertions, 4 deletions
diff --git a/widget/src/text_input.rs b/widget/src/text_input.rs index f5b57422..72ed1ef3 100644 --- a/widget/src/text_input.rs +++ b/widget/src/text_input.rs @@ -122,8 +122,8 @@ where      }      /// Converts the [`TextInput`] into a secure password input. -    pub fn password(mut self) -> Self { -        self.is_secure = true; +    pub fn secure(mut self, is_secure: bool) -> Self { +        self.is_secure = is_secure;          self      } @@ -991,9 +991,9 @@ where                  }                  return event::Status::Captured; -            } else { -                state.is_pasting = None;              } + +            state.is_pasting = None;          }          Event::Keyboard(keyboard::Event::ModifiersChanged(modifiers)) => {              let state = state();  | 
