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:
1 parent
41b450eedf
commit
540e785d8b
28 files changed
+172
-156
No files matched your search
@@ -14,15 +14,16 @@
|
||||
//! primitives in our own custom components.
|
||||
|
||||
use dioxus::prelude::*;
|
||||
use dioxus_desktop::{Config, LogicalSize, WindowBuilder};
|
||||
|
||||
fn main() {
|
||||
use dioxus_desktop::tao::dpi::LogicalSize;
|
||||
dioxus_desktop::launch_cfg(app, |cfg| {
|
||||
cfg.with_window(|w| {
|
||||
w.with_title("Doggo Fetcher")
|
||||
.with_inner_size(LogicalSize::new(600.0, 800.0))
|
||||
})
|
||||
});
|
||||
let cfg = Config::new().with_window(
|
||||
WindowBuilder::new()
|
||||
.with_title("Doggo Fetcher")
|
||||
.with_inner_size(LogicalSize::new(600.0, 800.0)),
|
||||
);
|
||||
|
||||
dioxus_desktop::launch_cfg(app, cfg);
|
||||
}
|
||||
|
||||
#[derive(serde::Deserialize)]
|
||||
|
||||
Reference in new issue
Block a user