Skip to content

Commit

Permalink
Clarify wording of Checkbox methods.
Browse files Browse the repository at this point in the history
  • Loading branch information
luleyleo committed Oct 25, 2020
1 parent 9c1ad93 commit a7ae176
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions druid/src/widget/checkbox.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,15 @@ pub struct Checkbox {
}

impl Checkbox {
/// Create a new `Checkbox` with a label.
pub fn new(label: impl Into<LabelText<bool>>) -> Checkbox {
/// Create a new `Checkbox` with a text label.
pub fn new(text: impl Into<LabelText<bool>>) -> Checkbox {
Checkbox {
child_label: Label::new(label),
child_label: Label::new(text),
}
}

/// Update the label.
pub fn set_label(&mut self, label: impl Into<LabelText<bool>>) {
/// Update the text label.
pub fn set_text(&mut self, label: impl Into<LabelText<bool>>) {
self.child_label.set_text(label);
}
}
Expand Down

0 comments on commit a7ae176

Please sign in to comment.