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,30 +0,0 @@
|
|||
use gtk::{gio::SimpleAction, prelude::ActionExt, prelude::ButtonExt, Button};
|
||||
use std::sync::Arc;
|
||||
|
||||
pub struct Tab {
|
||||
pub gobject: Button,
|
||||
}
|
||||
|
||||
impl Tab {
|
||||
// Construct
|
||||
pub fn new(action_tab_append: Arc<SimpleAction>) -> Self {
|
||||
// Init widget
|
||||
let gobject = Button::builder()
|
||||
.icon_name("tab-new-symbolic")
|
||||
.tooltip_text("New tab")
|
||||
.build();
|
||||
|
||||
// Init events
|
||||
gobject.connect_clicked(move |_| {
|
||||
action_tab_append.activate(None);
|
||||
});
|
||||
|
||||
// Return activated struct
|
||||
Self { gobject }
|
||||
}
|
||||
|
||||
// Getters
|
||||
pub fn gobject(&self) -> &Button {
|
||||
&self.gobject
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue