mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-02 17:45:28 +00:00
use arc pointer
This commit is contained in:
parent
f00d652a91
commit
1a644ee219
1 changed files with 5 additions and 3 deletions
|
|
@ -1,3 +1,5 @@
|
||||||
|
use std::sync::Arc;
|
||||||
|
|
||||||
use gtk::{Box, Orientation};
|
use gtk::{Box, Orientation};
|
||||||
|
|
||||||
pub struct Content {
|
pub struct Content {
|
||||||
|
|
@ -6,10 +8,10 @@ pub struct Content {
|
||||||
|
|
||||||
impl Content {
|
impl Content {
|
||||||
// Construct
|
// Construct
|
||||||
pub fn new() -> Content {
|
pub fn new() -> Arc<Content> {
|
||||||
Self {
|
Arc::new(Self {
|
||||||
widget: Box::builder().orientation(Orientation::Vertical).build(),
|
widget: Box::builder().orientation(Orientation::Vertical).build(),
|
||||||
}
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// Getters
|
// Getters
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue