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