rename widget struct entity

This commit is contained in:
yggverse 2024-09-23 15:07:41 +03:00
parent 3d7be25c5f
commit 4b78ccb779
3 changed files with 16 additions and 16 deletions

View file

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