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

@ -1,19 +0,0 @@
use adw::ToolbarView;
use gtk::prelude::IsA;
pub struct Widget {
pub toolbar_view: ToolbarView,
}
impl Widget {
// Constructors
/// Build new `Self`
pub fn build(top_bar: &impl IsA<gtk::Widget>) -> Self {
let toolbar_view = ToolbarView::builder().build();
toolbar_view.add_top_bar(top_bar);
Self { toolbar_view }
}
}