Currently it is possible to set the is_valid property of Granite.ValidatedEntry independent of its changed signal, however the style is only updated in the connect_after callback for the changed signal, so it the style only changes when the text attribute is changed. This has the possibility of leaving the widget in an incoherent state where the style doesn't reflect the value of the is_valid property.
Steps to Reproduce
change the is_valid property without using the changed signal
var entry = new Granite.ValidatedEntry ();
entry.text = "text";
entry.is_valid = false;
here even though the state is invalid the styling would reflect a valid state
Expected Behavior
I'm not entirely sure as to what the expected behavior here is, as this is more of a developer facing issue than a user facing issue. This is not even really an issue if the intended behavior is to use the is_valid property exclusively inside the changed signal. But it is weird that the API allows for the incoherence.
Supporting the change of is_valid outside the changed signal could be useful in cases where the validation condition might change outside of the widget without the value inside the widget changing. However this could be outside the scope of Granite.ValidatedEntry.
What Happened?
Currently it is possible to set the
is_valid
property ofGranite.ValidatedEntry
independent of itschanged
signal, however the style is only updated in theconnect_after
callback for thechanged
signal, so it the style only changes when thetext
attribute is changed. This has the possibility of leaving the widget in an incoherent state where the style doesn't reflect the value of theis_valid
property.Steps to Reproduce
change the
is_valid
property without using thechanged
signalhere even though the state is invalid the styling would reflect a valid state
Expected Behavior
I'm not entirely sure as to what the expected behavior here is, as this is more of a developer facing issue than a user facing issue. This is not even really an issue if the intended behavior is to use the
is_valid
property exclusively inside thechanged
signal. But it is weird that the API allows for the incoherence.Supporting the change of
is_valid
outside thechanged
signal could be useful in cases where the validation condition might change outside of the widget without the value inside the widget changing. However this could be outside the scope ofGranite.ValidatedEntry
.OS Version
6.x (Odin)
Software Version
Latest release (I have run all updates)
Log Output
No response
Hardware Info
No response