mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-02 01:25:27 +00:00
begin libadwaita headerbar tabs integration
This commit is contained in:
parent
765a24f331
commit
ce29a06dda
16 changed files with 269 additions and 156 deletions
|
|
@ -1,23 +1,23 @@
|
|||
use adw::{HeaderBar, WindowTitle};
|
||||
use adw::ToolbarView;
|
||||
use gtk::Box;
|
||||
use std::sync::Arc;
|
||||
|
||||
pub struct Widget {
|
||||
gobject: HeaderBar,
|
||||
gobject: ToolbarView,
|
||||
}
|
||||
|
||||
impl Widget {
|
||||
// Construct
|
||||
pub fn new(pack_start: &Box, title_widget: Option<&WindowTitle>) -> Self {
|
||||
let gobject = HeaderBar::builder().build();
|
||||
pub fn new_arc(top_bar: &Box) -> Arc<Self> {
|
||||
let gobject = ToolbarView::builder().build();
|
||||
|
||||
gobject.pack_start(pack_start);
|
||||
gobject.set_title_widget(title_widget);
|
||||
gobject.add_top_bar(top_bar);
|
||||
|
||||
Self { gobject }
|
||||
Arc::new(Self { gobject })
|
||||
}
|
||||
|
||||
// Getters
|
||||
pub fn gobject(&self) -> &HeaderBar {
|
||||
pub fn gobject(&self) -> &ToolbarView {
|
||||
&self.gobject
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue