mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-01 00:55:28 +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
|
|
@ -2,12 +2,14 @@ mod description;
|
|||
mod title;
|
||||
|
||||
use description::Description;
|
||||
use gtk::prelude::BoxExt;
|
||||
use gtk::{Align, Box, Orientation};
|
||||
use title::Title;
|
||||
|
||||
use gtk::{glib::GString, prelude::BoxExt, Align, Box, Orientation};
|
||||
|
||||
pub struct Subject {
|
||||
widget: Box,
|
||||
title: Title,
|
||||
description: Description,
|
||||
}
|
||||
|
||||
impl Subject {
|
||||
|
|
@ -24,7 +26,17 @@ impl Subject {
|
|||
widget.append(title.widget());
|
||||
widget.append(description.widget());
|
||||
|
||||
Self { widget }
|
||||
Self {
|
||||
widget,
|
||||
title,
|
||||
description,
|
||||
}
|
||||
}
|
||||
|
||||
// Actions
|
||||
pub fn update(&self, title: GString, description: GString) {
|
||||
self.title.update(&title);
|
||||
self.description.update(&description);
|
||||
}
|
||||
|
||||
// Getters
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue