mirror of
https://github.com/YGGverse/Yoda.git
synced 2025-02-10 18:34:14 +00:00
init tab child widgets
This commit is contained in:
parent
f05a9c765e
commit
5070010b2b
@ -1,6 +1,22 @@
|
||||
#[path = "tab/label.rs"] mod label;
|
||||
#[path = "tab/page.rs"] mod page;
|
||||
|
||||
use gtk::Notebook;
|
||||
|
||||
pub fn new() -> Notebook
|
||||
{
|
||||
return Notebook::builder().scrollable(true).build();
|
||||
}
|
||||
|
||||
pub fn append(
|
||||
tab : Notebook,
|
||||
is_current : bool
|
||||
) -> u32
|
||||
{
|
||||
return tab.append_page(
|
||||
&page::new(),
|
||||
Some(
|
||||
&label::new()
|
||||
)
|
||||
);
|
||||
}
|
9
src/app/browser/main/tab/label.rs
Normal file
9
src/app/browser/main/tab/label.rs
Normal file
@ -0,0 +1,9 @@
|
||||
use gtk::Box;
|
||||
// use gtk::prelude::BoxExt; @TODO append
|
||||
|
||||
pub fn new() -> Box
|
||||
{
|
||||
return Box::builder().orientation(
|
||||
gtk::Orientation::Vertical
|
||||
).build();
|
||||
}
|
9
src/app/browser/main/tab/page.rs
Normal file
9
src/app/browser/main/tab/page.rs
Normal file
@ -0,0 +1,9 @@
|
||||
use gtk::Box;
|
||||
// use gtk::prelude::BoxExt; @TODO append
|
||||
|
||||
pub fn new() -> Box
|
||||
{
|
||||
return Box::builder().orientation(
|
||||
gtk::Orientation::Vertical
|
||||
).build();
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user