mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-01 17:15:28 +00:00
use trait for ToolbarView
This commit is contained in:
parent
49c1f5923b
commit
1077368116
3 changed files with 21 additions and 41 deletions
|
|
@ -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 }
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue