implement bar box as trait

This commit is contained in:
yggverse 2025-01-26 15:58:12 +02:00
parent 8b4d184ad7
commit 137a1c72b6
3 changed files with 24 additions and 55 deletions

View file

@ -1,30 +0,0 @@
use gtk::{
prelude::{BoxExt, IsA},
Box, Orientation,
};
pub struct Widget {
pub g_box: Box,
}
impl Widget {
// Constructors
/// Build new `Self`
pub fn build(
control: &impl IsA<gtk::Widget>,
menu: &impl IsA<gtk::Widget>,
tab: &impl IsA<gtk::Widget>,
) -> Self {
let g_box = Box::builder()
.orientation(Orientation::Horizontal)
.spacing(8)
.build();
g_box.append(tab);
g_box.append(menu);
g_box.append(control);
Self { g_box }
}
}