mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-01 00:55:28 +00:00
update browser constructor api, prelude required entities only
This commit is contained in:
parent
77303d548e
commit
c27189f1ab
2 changed files with 45 additions and 10 deletions
|
|
@ -3,12 +3,37 @@
|
|||
|
||||
use gtk::{Application, ApplicationWindow};
|
||||
|
||||
pub fn new(app: &Application) -> ApplicationWindow
|
||||
pub fn new(
|
||||
app : &Application,
|
||||
width : i32,
|
||||
height : i32
|
||||
) -> ApplicationWindow
|
||||
{
|
||||
return ApplicationWindow::builder().application(app)
|
||||
.default_width(640)
|
||||
.default_height(480)
|
||||
.titlebar(&header::new())
|
||||
.child(&main::new())
|
||||
.build();
|
||||
return ApplicationWindow::builder()
|
||||
|
||||
// Relate
|
||||
.application(
|
||||
app
|
||||
)
|
||||
|
||||
// Tuneup
|
||||
.default_width(
|
||||
width
|
||||
)
|
||||
|
||||
.default_height(
|
||||
height
|
||||
)
|
||||
|
||||
// Init components
|
||||
.titlebar(
|
||||
&header::new()
|
||||
)
|
||||
|
||||
.child(
|
||||
&main::new()
|
||||
)
|
||||
|
||||
// Make
|
||||
.build();
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue