mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-01 17:15:28 +00:00
give name to gobject variables
This commit is contained in:
parent
702269f1f1
commit
a1617b2b1b
35 changed files with 213 additions and 209 deletions
|
|
@ -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 }
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue