give name to gobject

This commit is contained in:
yggverse 2024-12-12 13:21:16 +02:00
parent 6911559915
commit 2f6059db2f
2 changed files with 9 additions and 9 deletions

View File

@ -70,7 +70,7 @@ impl Page {
let widget = Rc::new(Widget::new( let widget = Rc::new(Widget::new(
&id, &id,
&navigation.widget.gobject, &navigation.widget.g_box,
&content.g_box, &content.g_box,
&input.widget.clamp, &input.widget.clamp,
)); ));

View File

@ -7,7 +7,7 @@ const MARGIN: i32 = 6;
const SPACING: i32 = 6; const SPACING: i32 = 6;
pub struct Widget { pub struct Widget {
pub gobject: Box, pub g_box: Box,
} }
impl Widget { impl Widget {
@ -19,7 +19,7 @@ impl Widget {
request: &impl IsA<gtk::Widget>, request: &impl IsA<gtk::Widget>,
bookmark: &impl IsA<gtk::Widget>, bookmark: &impl IsA<gtk::Widget>,
) -> Self { ) -> Self {
let gobject = Box::builder() let g_box = Box::builder()
.orientation(Orientation::Horizontal) .orientation(Orientation::Horizontal)
.spacing(SPACING) .spacing(SPACING)
.margin_start(MARGIN) .margin_start(MARGIN)
@ -27,12 +27,12 @@ impl Widget {
.margin_bottom(MARGIN) .margin_bottom(MARGIN)
.build(); .build();
gobject.append(base); g_box.append(base);
gobject.append(history); g_box.append(history);
gobject.append(reload); g_box.append(reload);
gobject.append(request); g_box.append(request);
gobject.append(bookmark); g_box.append(bookmark);
Self { gobject } Self { g_box }
} }
} }