Yoda 0.10.11

Browser for Gemini Protocol
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use gtk::{Align, Label};

pub trait Title {
    fn title(title: Option<&str>) -> Self;
}

impl Title for Label {
    fn title(title: Option<&str>) -> Self {
        Label::builder()
            .css_classes(["heading"])
            .halign(Align::Start)
            .label(title.unwrap_or("Input expected"))
            .build()
    }
}