Add disabled state and on_toggle handler to Toggler

Co-authored-by: Your Name here only <krishnsundaram@gmail.com>
This commit is contained in:
Héctor Ramón Jiménez 2024-09-11 00:17:16 +02:00
parent 770176a4e1
commit c741688b4c
No known key found for this signature in database
GPG key ID: 7CC46565708259A7
5 changed files with 57 additions and 30 deletions

View file

@ -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),