mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-02 01:25:27 +00:00
generate unique HashMap keys for children widgets
This commit is contained in:
parent
0d89e16622
commit
f407117470
3 changed files with 46 additions and 30 deletions
|
|
@ -1,21 +1,23 @@
|
|||
mod content;
|
||||
mod navigation;
|
||||
|
||||
use gtk::prelude::BoxExt;
|
||||
use gtk::{Box, Orientation};
|
||||
use gtk::{glib::GString, prelude::BoxExt, Box, Orientation};
|
||||
|
||||
pub struct Page {
|
||||
widget: Box,
|
||||
}
|
||||
|
||||
impl Page {
|
||||
pub fn new() -> Page {
|
||||
pub fn new(name: GString) -> Page {
|
||||
// Init components
|
||||
let navigation = navigation::Navigation::new();
|
||||
let content = content::Content::new();
|
||||
|
||||
// Init widget
|
||||
let widget = Box::builder().orientation(Orientation::Vertical).build();
|
||||
let widget = Box::builder()
|
||||
.orientation(Orientation::Vertical)
|
||||
.name(name)
|
||||
.build();
|
||||
|
||||
widget.append(navigation.widget());
|
||||
widget.append(content.widget());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue