summaryrefslogtreecommitdiffstats
path: root/examples/editor
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2024-09-11 00:20:23 +0200
committerLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2024-09-11 00:22:39 +0200
commit6e4970c01a9e42621a0ded340dcdccb4204ab5d2 (patch)
tree2f244426201bba5be7c3d3d41f237d062ce722a6 /examples/editor
parentc741688b4c52dd2397880ca05b5f9a997d762246 (diff)
downloadiced-6e4970c01a9e42621a0ded340dcdccb4204ab5d2.tar.gz
iced-6e4970c01a9e42621a0ded340dcdccb4204ab5d2.tar.bz2
iced-6e4970c01a9e42621a0ded340dcdccb4204ab5d2.zip
Add `label` method to `Toggler`
Diffstat (limited to 'examples/editor')
-rw-r--r--examples/editor/src/main.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/examples/editor/src/main.rs b/examples/editor/src/main.rs
index c7d7eb26..d55f9bdf 100644
--- a/examples/editor/src/main.rs
+++ b/examples/editor/src/main.rs
@@ -150,7 +150,8 @@ impl Editor {
self.is_dirty.then_some(Message::SaveFile)
),
horizontal_space(),
- toggler(Some("Word Wrap"), self.word_wrap)
+ toggler(self.word_wrap)
+ .label("Word Wrap")
.on_toggle(Message::WordWrapToggled),
pick_list(
highlighter::Theme::ALL,