mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-01 00:55:28 +00:00
use canonical module subfolder tree
This commit is contained in:
parent
80783d2ae4
commit
8969899a2f
24 changed files with 0 additions and 23 deletions
|
|
@ -1,23 +0,0 @@
|
|||
use gtk::Label;
|
||||
|
||||
pub fn new() -> Label {
|
||||
let title = Label::builder()
|
||||
.css_classes(["title"])
|
||||
.single_line_mode(true)
|
||||
.ellipsize(gtk::pango::EllipsizeMode::End)
|
||||
.build();
|
||||
|
||||
update(&title, "Welcome");
|
||||
|
||||
return title;
|
||||
}
|
||||
|
||||
pub fn update(title: &Label, text: &str) {
|
||||
let default_text = "Yoda"; // @TODO
|
||||
|
||||
if text.is_empty() {
|
||||
title.set_text(default_text);
|
||||
} else {
|
||||
title.set_text(&format!("{} - {}", text, default_text));
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue