mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-01 00:55:28 +00:00
complete widget submodule refactory
This commit is contained in:
parent
e45b7f0a4a
commit
1e42a75f2e
29 changed files with 585 additions and 145 deletions
|
|
@ -1,16 +1,24 @@
|
|||
mod pin;
|
||||
mod title;
|
||||
mod widget;
|
||||
|
||||
use gtk::prelude::BoxExt;
|
||||
use gtk::Box;
|
||||
|
||||
pub fn new() -> Box {
|
||||
let label = Box::builder()
|
||||
.orientation(gtk::Orientation::Horizontal)
|
||||
.build();
|
||||
|
||||
label.append(&pin::new(false));
|
||||
label.append(&title::new());
|
||||
|
||||
label
|
||||
pub struct Label {
|
||||
widget: widget::Label,
|
||||
}
|
||||
|
||||
impl Label {
|
||||
// Construct
|
||||
pub fn new() -> Label {
|
||||
Self {
|
||||
widget: widget::Label::new(
|
||||
pin::Pin::new().widget().gtk(),
|
||||
title::Title::new().widget().gtk(),
|
||||
),
|
||||
}
|
||||
}
|
||||
|
||||
// Getters
|
||||
pub fn widget(&self) -> &widget::Label {
|
||||
&self.widget
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue