s/text_value/current_text_value/

This commit is contained in:
Nolan Darilek 2021-05-19 09:39:04 -05:00
parent ff9059fe68
commit 875d3a650d

View file

@ -242,7 +242,7 @@ pub struct WidgetInfo {
/// The text on labels, buttons, checkboxes etc. /// The text on labels, buttons, checkboxes etc.
pub label: Option<String>, pub label: Option<String>,
/// The contents of some editable text (for `TextEdit` fields). /// The contents of some editable text (for `TextEdit` fields).
pub text_value: Option<String>, pub current_text_value: Option<String>,
// The previous text value. // The previous text value.
pub prev_text_value: Option<String>, pub prev_text_value: Option<String>,
/// The current value of checkboxes and radio buttons. /// The current value of checkboxes and radio buttons.
@ -261,7 +261,7 @@ impl std::fmt::Debug for WidgetInfo {
typ, typ,
enabled, enabled,
label, label,
text_value, current_text_value: text_value,
prev_text_value, prev_text_value,
selected, selected,
value, value,
@ -306,7 +306,7 @@ impl WidgetInfo {
typ, typ,
enabled: true, enabled: true,
label: None, label: None,
text_value: None, current_text_value: None,
prev_text_value: None, prev_text_value: None,
selected: None, selected: None,
value: None, value: None,
@ -353,7 +353,7 @@ impl WidgetInfo {
#[allow(clippy::needless_pass_by_value)] #[allow(clippy::needless_pass_by_value)]
pub fn text_edit(text_value: impl ToString, prev_text_value: impl ToString) -> Self { pub fn text_edit(text_value: impl ToString, prev_text_value: impl ToString) -> Self {
Self { Self {
text_value: Some(text_value.to_string()), current_text_value: Some(text_value.to_string()),
prev_text_value: Some(prev_text_value.to_string()), prev_text_value: Some(prev_text_value.to_string()),
..Self::new(WidgetType::TextEdit) ..Self::new(WidgetType::TextEdit)
} }
@ -368,7 +368,7 @@ impl WidgetInfo {
Self { Self {
primary_cursor: Some(primary_cursor), primary_cursor: Some(primary_cursor),
secondary_cursor: Some(secondary_cursor), secondary_cursor: Some(secondary_cursor),
text_value: Some(text_value.to_string()), current_text_value: Some(text_value.to_string()),
..Self::new(WidgetType::TextEdit) ..Self::new(WidgetType::TextEdit)
} }
} }
@ -379,7 +379,7 @@ impl WidgetInfo {
typ, typ,
enabled, enabled,
label, label,
text_value, current_text_value: text_value,
prev_text_value: _, prev_text_value: _,
selected, selected,
value, value,