Yoda/src/browser/main/tab/label/widget.rs
2024-09-22 22:23:44 +03:00

24 lines
448 B
Rust

use gtk::prelude::BoxExt;
pub struct Label {
gtk: gtk::Box,
}
impl Label {
// Construct new object
pub fn new(pin: &gtk::Image, title: &gtk::Label) -> Label {
let gtk = gtk::Box::builder()
.orientation(gtk::Orientation::Horizontal)
.build();
gtk.append(pin);
gtk.append(title);
Self { gtk }
}
// Getters
pub fn gtk(&self) -> &gtk::Box {
&self.gtk
}
}