use libadwaita for app & app window

This commit is contained in:
yggverse 2024-10-09 10:50:41 +03:00
parent e2ab831d57
commit 9e5a2a490c
11 changed files with 57 additions and 47 deletions

View file

@ -0,0 +1,30 @@
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
}
}