Yoda 0.11.6

Browser for Gemini Protocol
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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"))
            .selectable(true)
            .build()
    }
}