give name to gobject variables

This commit is contained in:
yggverse 2024-12-14 06:50:30 +02:00
parent 702269f1f1
commit a1617b2b1b
35 changed files with 213 additions and 209 deletions

View file

@ -4,7 +4,7 @@ use gtk::{
};
pub struct Widget {
gobject: Box,
pub g_box: Box,
}
impl Widget {
@ -17,20 +17,15 @@ impl Widget {
input: &impl IsA<gtk::Widget>,
) -> Self {
// Init self
let gobject = Box::builder()
let g_box = Box::builder()
.orientation(Orientation::Vertical)
.name(name)
.build();
gobject.append(navigation);
gobject.append(content);
gobject.append(input);
g_box.append(navigation);
g_box.append(content);
g_box.append(input);
Self { gobject }
}
// Getters
pub fn gobject(&self) -> &Box {
&self.gobject
Self { g_box }
}
}