mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-01 17:15:28 +00:00
fix title visibility toggle
This commit is contained in:
parent
ac34802f0d
commit
9f7016d736
1 changed files with 5 additions and 3 deletions
|
|
@ -16,9 +16,11 @@ impl Widget {
|
|||
.visible(false)
|
||||
.build();
|
||||
|
||||
match title {
|
||||
Some(value) => gobject.set_label(value),
|
||||
None => gobject.set_visible(false),
|
||||
if let Some(label) = title {
|
||||
if !label.is_empty() {
|
||||
gobject.set_label(label);
|
||||
gobject.set_visible(true)
|
||||
}
|
||||
}
|
||||
|
||||
Arc::new(Self { gobject })
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue