mirror of
https://github.com/YGGverse/Yoda.git
synced 2025-01-15 17:20:08 +00:00
enshort condition
This commit is contained in:
parent
ddb24c9084
commit
10737998a9
@ -59,13 +59,8 @@ impl List {
|
|||||||
// Update `title` (expected as the first child)
|
// Update `title` (expected as the first child)
|
||||||
let title = child.first_child().unwrap().downcast::<Label>().unwrap();
|
let title = child.first_child().unwrap().downcast::<Label>().unwrap();
|
||||||
|
|
||||||
if item.is_active() {
|
|
||||||
title.set_css_classes(&["success"]);
|
|
||||||
} else {
|
|
||||||
title.set_css_classes(&[]);
|
|
||||||
}
|
|
||||||
|
|
||||||
title.set_label(&item.title());
|
title.set_label(&item.title());
|
||||||
|
title.set_css_classes(if item.is_active() { &["success"] } else { &[] });
|
||||||
|
|
||||||
// Update `subtitle` (expected as the last child)
|
// Update `subtitle` (expected as the last child)
|
||||||
child
|
child
|
||||||
|
Loading…
x
Reference in New Issue
Block a user