diff options
author | 2024-09-11 00:20:23 +0200 | |
---|---|---|
committer | 2024-09-11 00:22:39 +0200 | |
commit | 6e4970c01a9e42621a0ded340dcdccb4204ab5d2 (patch) | |
tree | 2f244426201bba5be7c3d3d41f237d062ce722a6 /examples/styling | |
parent | c741688b4c52dd2397880ca05b5f9a997d762246 (diff) | |
download | iced-6e4970c01a9e42621a0ded340dcdccb4204ab5d2.tar.gz iced-6e4970c01a9e42621a0ded340dcdccb4204ab5d2.tar.bz2 iced-6e4970c01a9e42621a0ded340dcdccb4204ab5d2.zip |
Add `label` method to `Toggler`
Diffstat (limited to 'examples/styling')
-rw-r--r-- | examples/styling/src/main.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/examples/styling/src/main.rs b/examples/styling/src/main.rs index 222ab79d..534f5e32 100644 --- a/examples/styling/src/main.rs +++ b/examples/styling/src/main.rs @@ -77,7 +77,8 @@ impl Styling { let checkbox = checkbox("Check me!", self.checkbox_value) .on_toggle(Message::CheckboxToggled); - let toggler = toggler(Some("Toggle me!"), self.toggler_value) + let toggler = toggler(self.toggler_value) + .label("Toggle me!") .on_toggle(Message::TogglerToggled) .spacing(10); |