mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-01 00:55:28 +00:00
init browser modules
This commit is contained in:
parent
0f81beb26b
commit
6f9863d0e7
5 changed files with 41 additions and 13 deletions
15
src/app/browser.rs
Normal file
15
src/app/browser.rs
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
#[path = "browser/header.rs"] mod header;
|
||||
#[path = "browser/main.rs"] mod main;
|
||||
|
||||
use gtk4 as gtk;
|
||||
use gtk::{Application, ApplicationWindow};
|
||||
|
||||
pub fn new(app: &Application) -> ApplicationWindow
|
||||
{
|
||||
return ApplicationWindow::builder().application(app)
|
||||
.default_width(640)
|
||||
.default_height(480)
|
||||
//.titlebar(&header::new())
|
||||
.child(&main::new())
|
||||
.build();
|
||||
}
|
||||
7
src/app/browser/header.rs
Normal file
7
src/app/browser/header.rs
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
use gtk4 as gtk;
|
||||
use gtk::HeaderBar;
|
||||
|
||||
pub fn new() -> HeaderBar
|
||||
{
|
||||
return HeaderBar::builder().build();
|
||||
}
|
||||
9
src/app/browser/main.rs
Normal file
9
src/app/browser/main.rs
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
use gtk4 as gtk;
|
||||
use gtk::Box;
|
||||
|
||||
pub fn new() -> Box
|
||||
{
|
||||
return Box::builder().orientation(
|
||||
gtk::Orientation::Vertical
|
||||
).build();
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue