label: Fix typo (#722)
This commit is contained in:
parent
88325ea14b
commit
49e8b06ccb
1 changed files with 4 additions and 4 deletions
|
|
@ -11,7 +11,7 @@ pub struct Label {
|
||||||
base: Div,
|
base: Div,
|
||||||
label: SharedString,
|
label: SharedString,
|
||||||
chars_count: usize,
|
chars_count: usize,
|
||||||
marked: bool,
|
masked: bool,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Label {
|
impl Label {
|
||||||
|
|
@ -22,12 +22,12 @@ impl Label {
|
||||||
base: div().line_height(rems(1.25)),
|
base: div().line_height(rems(1.25)),
|
||||||
label,
|
label,
|
||||||
chars_count,
|
chars_count,
|
||||||
marked: false,
|
masked: false,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn masked(mut self, masked: bool) -> Self {
|
pub fn masked(mut self, masked: bool) -> Self {
|
||||||
self.marked = masked;
|
self.masked = masked;
|
||||||
self
|
self
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -40,7 +40,7 @@ impl Styled for Label {
|
||||||
|
|
||||||
impl RenderOnce for Label {
|
impl RenderOnce for Label {
|
||||||
fn render(self, _: &mut Window, cx: &mut App) -> impl IntoElement {
|
fn render(self, _: &mut Window, cx: &mut App) -> impl IntoElement {
|
||||||
let text = if self.marked {
|
let text = if self.masked {
|
||||||
SharedString::from(MASKED.repeat(self.chars_count))
|
SharedString::from(MASKED.repeat(self.chars_count))
|
||||||
} else {
|
} else {
|
||||||
self.label
|
self.label
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue