mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-01 09:05:27 +00:00
draft header update on page reload
This commit is contained in:
parent
8977adab77
commit
ca74a29ffa
6 changed files with 72 additions and 10 deletions
|
|
@ -4,11 +4,12 @@ mod tray;
|
|||
use subject::Subject;
|
||||
use tray::Tray;
|
||||
|
||||
use gtk::HeaderBar;
|
||||
use gtk::{glib::GString, HeaderBar};
|
||||
use std::sync::Arc;
|
||||
|
||||
pub struct Header {
|
||||
widget: HeaderBar,
|
||||
subject: Subject,
|
||||
}
|
||||
|
||||
impl Header {
|
||||
|
|
@ -21,7 +22,12 @@ impl Header {
|
|||
widget.pack_start(tray.widget());
|
||||
widget.set_title_widget(Some(subject.widget()));
|
||||
|
||||
Arc::new(Self { widget })
|
||||
Arc::new(Self { widget, subject })
|
||||
}
|
||||
|
||||
// Actions
|
||||
pub fn update(&self, title: GString, description: GString) {
|
||||
self.subject.update(title, description);
|
||||
}
|
||||
|
||||
// Getters
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue