implement launch builder for the desktop and web platforms
This commit is contained in:
1 parent
ef553a2cb2
commit
7e4d2debe0
70 files changed
+448
-431
No files matched your search
@@ -5,9 +5,9 @@ use dioxus_desktop::use_wry_event_handler;
|
||||
use dioxus_desktop::{Config, WindowCloseBehaviour};
|
||||
|
||||
fn main() {
|
||||
Config::new()
|
||||
.with_close_behaviour(WindowCloseBehaviour::CloseWindow)
|
||||
.launch(app)
|
||||
LaunchBuilder::new(app)
|
||||
.cfg(Config::new().with_close_behaviour(WindowCloseBehaviour::CloseWindow))
|
||||
.launch()
|
||||
}
|
||||
|
||||
fn app() -> Element {
|
||||
@@ -22,12 +22,7 @@ fn app() -> Element {
|
||||
});
|
||||
|
||||
rsx! {
|
||||
div {
|
||||
width: "100%",
|
||||
height: "100%",
|
||||
display: "flex",
|
||||
flex_direction: "column",
|
||||
align_items: "center",
|
||||
div { width: "100%", height: "100%", display: "flex", flex_direction: "column", align_items: "center",
|
||||
if focused() {
|
||||
"This window is focused!"
|
||||
} else {
|
||||
|
||||
Reference in new issue
Block a user