follow new construction protocol

This commit is contained in:
yggverse 2024-09-26 00:59:44 +03:00
parent c03bef9f15
commit 1db706aa5b
7 changed files with 25 additions and 30 deletions

View file

@ -10,8 +10,6 @@ use gtk::{
Align, Box, Orientation,
};
use std::sync::Arc;
pub struct Label {
// Components
pin: Pin,
@ -23,7 +21,7 @@ pub struct Label {
impl Label {
// Construct
pub fn new(name: GString, is_pinned: bool) -> Arc<Label> {
pub fn new(name: GString, is_pinned: bool) -> Label {
// Components
let pin = Pin::new(is_pinned);
let title = Title::new();
@ -39,7 +37,7 @@ impl Label {
widget.append(title.widget());
// Result
Arc::new(Self { pin, title, widget })
Self { pin, title, widget }
}
// Actions