mirror of
https://github.com/YGGverse/Yoda.git
synced 2025-01-26 19:14:13 +00:00
fix title display
This commit is contained in:
parent
771908a334
commit
eae35d5ab8
@ -1,4 +1,4 @@
|
||||
use gtk::{prelude::WidgetExt, Align, Label};
|
||||
use gtk::{Align, Label};
|
||||
|
||||
pub struct Title {
|
||||
pub label: Label,
|
||||
@ -12,16 +12,9 @@ impl Title {
|
||||
let label = Label::builder()
|
||||
.css_classes(["heading"])
|
||||
.halign(Align::Start)
|
||||
.visible(false)
|
||||
.label(title.unwrap_or("Input expected"))
|
||||
.build();
|
||||
|
||||
if let Some(value) = title {
|
||||
if !value.is_empty() {
|
||||
label.set_label(value);
|
||||
label.set_visible(true)
|
||||
}
|
||||
}
|
||||
|
||||
Self { label }
|
||||
}
|
||||
}
|
||||
|
@ -14,7 +14,6 @@ impl Title {
|
||||
.css_classes(["heading"])
|
||||
.halign(Align::Start)
|
||||
.label(title.unwrap_or("Titan input"))
|
||||
.visible(false)
|
||||
.build(),
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user