use trait for ToolbarView

This commit is contained in:
yggverse 2025-01-26 16:46:48 +02:00
parent 49c1f5923b
commit 1077368116
3 changed files with 21 additions and 41 deletions

View file

@ -5,6 +5,7 @@ pub mod tab;
mod widget;
use action::{Action, Position};
use adw::ToolbarView;
use header::Header;
use sqlite::Transaction;
use tab::Tab;
@ -31,13 +32,8 @@ impl Window {
// Init components
let tab = Rc::new(Tab::build(profile, (browser_action, &action)));
let header = Rc::new(Header::build(
(browser_action, &action),
profile,
&tab.widget.tab_view,
));
let widget = Rc::new(Widget::build(
&header.widget.toolbar_view,
&ToolbarView::header((browser_action, &action), profile, &tab.widget.tab_view),
&tab.widget.tab_view,
));