mirror of
https://github.com/YGGverse/Yoda.git
synced 2025-02-11 10:54:14 +00:00
rename widget struct entity
This commit is contained in:
parent
3d7be25c5f
commit
4b78ccb779
@ -1,24 +1,24 @@
|
|||||||
use gtk::prelude::BoxExt;
|
use gtk::prelude::BoxExt;
|
||||||
|
|
||||||
pub struct Label {
|
pub struct Label {
|
||||||
gtk: gtk::Box,
|
container: gtk::Box,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Label {
|
impl Label {
|
||||||
// Construct new object
|
// Construct new object
|
||||||
pub fn new(pin: >k::Image, title: >k::Label) -> Label {
|
pub fn new(pin: >k::Image, title: >k::Label) -> Label {
|
||||||
let gtk = gtk::Box::builder()
|
let container = gtk::Box::builder()
|
||||||
.orientation(gtk::Orientation::Horizontal)
|
.orientation(gtk::Orientation::Horizontal)
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
gtk.append(pin);
|
container.append(pin);
|
||||||
gtk.append(title);
|
container.append(title);
|
||||||
|
|
||||||
Self { gtk }
|
Self { container }
|
||||||
}
|
}
|
||||||
|
|
||||||
// Getters
|
// Getters
|
||||||
pub fn gtk(&self) -> >k::Box {
|
pub fn container(&self) -> >k::Box {
|
||||||
&self.gtk
|
&self.container
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -17,8 +17,8 @@ impl Tab {
|
|||||||
// Actions
|
// Actions
|
||||||
pub fn append(&self, current: bool) -> u32 {
|
pub fn append(&self, current: bool) -> u32 {
|
||||||
self.widget.append(
|
self.widget.append(
|
||||||
label::Label::new().widget().gtk(),
|
label::Label::new().widget().container(),
|
||||||
page::Page::new().widget().gtk(),
|
page::Page::new().widget().container(),
|
||||||
current,
|
current,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
@ -1,24 +1,24 @@
|
|||||||
use gtk::prelude::BoxExt;
|
use gtk::prelude::BoxExt;
|
||||||
|
|
||||||
pub struct Page {
|
pub struct Page {
|
||||||
gtk: gtk::Box,
|
container: gtk::Box,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Page {
|
impl Page {
|
||||||
// Construct
|
// Construct
|
||||||
pub fn new(navigation: >k::Box, content: >k::Box) -> Page {
|
pub fn new(navigation: >k::Box, content: >k::Box) -> Page {
|
||||||
let gtk = gtk::Box::builder()
|
let container = gtk::Box::builder()
|
||||||
.orientation(gtk::Orientation::Vertical)
|
.orientation(gtk::Orientation::Vertical)
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
gtk.append(navigation);
|
container.append(navigation);
|
||||||
gtk.append(content);
|
container.append(content);
|
||||||
|
|
||||||
Self { gtk }
|
Self { container }
|
||||||
}
|
}
|
||||||
|
|
||||||
// Getters
|
// Getters
|
||||||
pub fn gtk(&self) -> >k::Box {
|
pub fn container(&self) -> >k::Box {
|
||||||
&self.gtk
|
&self.container
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user