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 57135f5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ You can find its changes [documented below](#060---2020-06-01).
- TextBox supports vertical movement ([#1280] by [@cmyr])
- Widgets can specify a baseline, flex rows can align baselines ([#1295] by [@cmyr])
- `TextBox::with_text_color` and `TextBox::set_text_color` ([#1320] by [@cmyr])
- `Checkbox::set_label` to update the label. ([#1346] by [@finnerale])
- `Checkbox::set_text` to update the label. ([#1346] by [@finnerale])

### Changed

Expand Down
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 57135f5

Please sign in to comment.