diff options
author | 2024-09-11 00:17:16 +0200 | |
---|---|---|
committer | 2024-09-11 00:22:13 +0200 | |
commit | c741688b4c52dd2397880ca05b5f9a997d762246 (patch) | |
tree | e8f07997ddaa22ba58e202fdc60ba76afdff5b1d /examples/styling | |
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/styling')
-rw-r--r-- | examples/styling/src/main.rs | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/examples/styling/src/main.rs b/examples/styling/src/main.rs index e19d5cf7..222ab79d 100644 --- a/examples/styling/src/main.rs +++ b/examples/styling/src/main.rs @@ -77,12 +77,9 @@ impl Styling { let checkbox = checkbox("Check me!", self.checkbox_value) .on_toggle(Message::CheckboxToggled); - let toggler = toggler( - Some("Toggle me!"), - self.toggler_value, - Message::TogglerToggled, - ) - .spacing(10); + let toggler = toggler(Some("Toggle me!"), self.toggler_value) + .on_toggle(Message::TogglerToggled) + .spacing(10); let content = column![ choose_theme, |