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

@ -6,6 +6,7 @@ use widget::Widget;
use super::{Action as WindowAction, BrowserAction, Profile};
use adw::TabView;
use gtk::Box;
use std::rc::Rc;
pub struct Header {
@ -21,16 +22,12 @@ impl Header {
profile: &Rc<Profile>,
tab_view: &TabView,
) -> Self {
// Init components
let bar = Rc::new(Bar::build(
(browser_action, window_action),
profile,
tab_view,
));
// Return new struct
Self {
widget: Rc::new(Widget::build(&bar.widget.g_box)),
widget: Rc::new(Widget::build(&Box::bar(
(browser_action, window_action),
profile,
tab_view,
))),
}
}
}