Browse Source

define mod struct

master
yggverse 2 months ago
parent
commit
83040ada79
  1. 17
      src/browser/header/mod.rs

17
src/browser/header/mod.rs

@ -1,12 +1,19 @@ @@ -1,12 +1,19 @@
mod subject;
mod tray;
use std::sync::Arc;
use gtk::HeaderBar;
pub fn new() -> HeaderBar {
let header = HeaderBar::builder().build();
pub struct Header {
pub widget: Arc<gtk::HeaderBar>,
}
pub fn new() -> Header {
let widget = Arc::new(HeaderBar::builder().build());
widget.pack_start(&tray::new());
widget.set_title_widget(Some(&subject::new()));
header.pack_start(&tray::new());
header.set_title_widget(Some(&subject::new()));
header
Header { widget }
}

Loading…
Cancel
Save