Less clumsy configuration for desktop and mobile (#553)

* chore: dont use prebuilt builder pattern for configuring desktop

* chore: use regular config pattern for web

* Chore: update docs too

* chore: clean up some warnings
This commit is contained in:
Jon Kelley authored and GitHub committed 2022-09-13 16:22:27 -07:00
1 parent 41b450eedf
commit 540e785d8b
28 files changed
+172 -156

No files matched your search

+8 -3
View File
@@ -1,9 +1,14 @@
use dioxus::prelude::*;
use dioxus_desktop::{Config, WindowBuilder};
fn main() {
dioxus_desktop::launch_cfg(app, |cfg| {
cfg.with_window(|w| w.with_title("BorderLess Demo").with_decorations(false))
});
let cfg = Config::new().with_window(
WindowBuilder::new()
.with_title("Borderless Window")
.with_decorations(false),
);
dioxus_desktop::launch_cfg(app, cfg);
}
fn app(cx: Scope) -> Element {