Add label method to Toggler
This commit is contained in:
parent
c741688b4c
commit
6e4970c01a
5 changed files with 17 additions and 11 deletions
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
|
|
@ -358,7 +358,8 @@ impl Tour {
|
|||
.push("A toggler is mostly used to enable or disable something.")
|
||||
.push(
|
||||
Container::new(
|
||||
toggler(Some("Toggle me to continue..."), self.toggler)
|
||||
toggler(self.toggler)
|
||||
.label("Toggle me to continue...")
|
||||
.on_toggle(Message::TogglerChanged),
|
||||
)
|
||||
.padding([0, 40]),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue