diff options
author | 2024-09-11 00:17:16 +0200 | |
---|---|---|
committer | 2024-09-11 00:22:13 +0200 | |
commit | c741688b4c52dd2397880ca05b5f9a997d762246 (patch) | |
tree | e8f07997ddaa22ba58e202fdc60ba76afdff5b1d /examples/editor | |
parent | 770176a4e19ef3db257daa311860b54a4ec14bc1 (diff) | |
download | iced-c741688b4c52dd2397880ca05b5f9a997d762246.tar.gz iced-c741688b4c52dd2397880ca05b5f9a997d762246.tar.bz2 iced-c741688b4c52dd2397880ca05b5f9a997d762246.zip |
Add disabled state and `on_toggle` handler to `Toggler`
Co-authored-by: Your Name here only <krishnsundaram@gmail.com>
Diffstat (limited to 'examples/editor')
-rw-r--r-- | examples/editor/src/main.rs | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/examples/editor/src/main.rs b/examples/editor/src/main.rs index 068782ba..c7d7eb26 100644 --- a/examples/editor/src/main.rs +++ b/examples/editor/src/main.rs @@ -150,11 +150,8 @@ impl Editor { self.is_dirty.then_some(Message::SaveFile) ), horizontal_space(), - toggler( - Some("Word Wrap"), - self.word_wrap, - Message::WordWrapToggled - ), + toggler(Some("Word Wrap"), self.word_wrap) + .on_toggle(Message::WordWrapToggled), pick_list( highlighter::Theme::ALL, Some(self.theme), |