mirror of
https://github.com/YGGverse/Yoda.git
synced 2025-03-13 06:01:21 +00:00
rename struct entity
This commit is contained in:
parent
7e7ad470e1
commit
b162682f51
@ -11,8 +11,8 @@ impl Label {
|
|||||||
pub fn new() -> Label {
|
pub fn new() -> Label {
|
||||||
Self {
|
Self {
|
||||||
widget: widget::Label::new(
|
widget: widget::Label::new(
|
||||||
pin::Pin::new().widget().gtk(),
|
pin::Pin::new().widget().image(),
|
||||||
title::Title::new().widget().gtk(),
|
title::Title::new().widget().label(),
|
||||||
),
|
),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,20 +1,20 @@
|
|||||||
pub struct Pin {
|
pub struct Pin {
|
||||||
gtk: gtk::Image,
|
image: gtk::Image,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Pin {
|
impl Pin {
|
||||||
// Construct
|
// Construct
|
||||||
pub fn new() -> Pin {
|
pub fn new() -> Pin {
|
||||||
let gtk = gtk::Image::builder()
|
let image = gtk::Image::builder()
|
||||||
.icon_name("view-pin-symbolic")
|
.icon_name("view-pin-symbolic")
|
||||||
.visible(false) //@TODO
|
.visible(false) //@TODO
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
Self { gtk }
|
Self { image }
|
||||||
}
|
}
|
||||||
|
|
||||||
// Getters
|
// Getters
|
||||||
pub fn gtk(&self) -> >k::Image {
|
pub fn image(&self) -> >k::Image {
|
||||||
&self.gtk
|
&self.image
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,22 +1,22 @@
|
|||||||
pub struct Title {
|
pub struct Title {
|
||||||
gtk: gtk::Label,
|
label: gtk::Label,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Title {
|
impl Title {
|
||||||
// Construct
|
// Construct
|
||||||
pub fn new() -> Title {
|
pub fn new() -> Title {
|
||||||
let gtk = gtk::Label::builder()
|
let label = gtk::Label::builder()
|
||||||
.label("New page")
|
.label("New page")
|
||||||
.ellipsize(gtk::pango::EllipsizeMode::End)
|
.ellipsize(gtk::pango::EllipsizeMode::End)
|
||||||
.width_chars(16)
|
.width_chars(16)
|
||||||
.single_line_mode(true)
|
.single_line_mode(true)
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
Self { gtk }
|
Self { label }
|
||||||
}
|
}
|
||||||
|
|
||||||
// Getters
|
// Getters
|
||||||
pub fn gtk(&self) -> >k::Label {
|
pub fn label(&self) -> >k::Label {
|
||||||
&self.gtk
|
&self.label
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user