mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-02 09:35:28 +00:00
draft Titan widget features
This commit is contained in:
parent
133d0f39f2
commit
c72da12c26
12 changed files with 343 additions and 2 deletions
|
|
@ -23,8 +23,11 @@ impl Widget {
|
|||
match bytes_left {
|
||||
Some(value) => {
|
||||
// Update color on chars left reached
|
||||
self.label
|
||||
.set_css_classes(&[if value > 0 { "success" } else { "error" }]); // @TODO add warning step?
|
||||
self.label.set_css_classes(&[if value.is_positive() {
|
||||
"success"
|
||||
} else {
|
||||
"error"
|
||||
}]); // @TODO add warning step?
|
||||
|
||||
// Update text
|
||||
self.label.set_label(&value.to_string());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue