Return change flag in paragraph::Plain::update
This commit is contained in:
parent
9b710a9aa8
commit
f031b99196
5 changed files with 32 additions and 18 deletions
|
|
@ -421,7 +421,7 @@ where
|
|||
shaping: *shaping,
|
||||
wrapping: text::Wrapping::default(),
|
||||
},
|
||||
bounds.center(),
|
||||
bounds.position(),
|
||||
style.icon_color,
|
||||
*viewport,
|
||||
);
|
||||
|
|
|
|||
|
|
@ -381,14 +381,14 @@ where
|
|||
{
|
||||
let label = option.to_string();
|
||||
|
||||
paragraph.update(Text {
|
||||
let _ = paragraph.update(Text {
|
||||
content: &label,
|
||||
..option_text
|
||||
});
|
||||
}
|
||||
|
||||
if let Some(placeholder) = &self.placeholder {
|
||||
state.placeholder.update(Text {
|
||||
let _ = state.placeholder.update(Text {
|
||||
content: placeholder,
|
||||
..option_text
|
||||
});
|
||||
|
|
|
|||
|
|
@ -325,12 +325,12 @@ where
|
|||
wrapping: text::Wrapping::default(),
|
||||
};
|
||||
|
||||
state.placeholder.update(placeholder_text);
|
||||
let _ = state.placeholder.update(placeholder_text);
|
||||
|
||||
let secure_value = self.is_secure.then(|| value.secure());
|
||||
let value = secure_value.as_ref().unwrap_or(value);
|
||||
|
||||
state.value.update(Text {
|
||||
let _ = state.value.update(Text {
|
||||
content: &value.to_string(),
|
||||
..placeholder_text
|
||||
});
|
||||
|
|
@ -350,7 +350,7 @@ where
|
|||
wrapping: text::Wrapping::default(),
|
||||
};
|
||||
|
||||
state.icon.update(icon_text);
|
||||
let _ = state.icon.update(icon_text);
|
||||
|
||||
let icon_width = state.icon.min_width();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue