diff --git a/CHANGELOG.md b/CHANGELOG.md index 50db28e5c7..7a4af253ab 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/druid/src/widget/checkbox.rs b/druid/src/widget/checkbox.rs index 6db64b348b..757547a73b 100644 --- a/druid/src/widget/checkbox.rs +++ b/druid/src/widget/checkbox.rs @@ -25,15 +25,15 @@ pub struct Checkbox { } impl Checkbox { - /// Create a new `Checkbox` with a label. - pub fn new(label: impl Into>) -> Checkbox { + /// Create a new `Checkbox` with a text label. + pub fn new(text: impl Into>) -> Checkbox { Checkbox { - child_label: Label::new(label), + child_label: Label::new(text), } } - /// Update the label. - pub fn set_label(&mut self, label: impl Into>) { + /// Update the text label. + pub fn set_text(&mut self, label: impl Into>) { self.child_label.set_text(label); } }