From c741688b4c52dd2397880ca05b5f9a997d762246 Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Wed, 11 Sep 2024 00:17:16 +0200 Subject: Add disabled state and `on_toggle` handler to `Toggler` Co-authored-by: Your Name here only --- examples/editor/src/main.rs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'examples/editor/src') 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), -- cgit