Trim off 150 deps for examples
This commit is contained in:
20 files changed
+297
-641
No files matched your search
@@ -15,7 +15,7 @@ fn main() {
|
||||
.with_inner_size(LogicalSize::new(300.0, 525.0)),
|
||||
);
|
||||
|
||||
LaunchBuilder::new(app).cfg(config).launch();
|
||||
LaunchBuilder::desktop().cfg(config).launch(app);
|
||||
}
|
||||
|
||||
fn app() -> Element {
|
||||
|
||||
+13
-9
@@ -5,13 +5,16 @@ use dioxus::prelude::*;
|
||||
use dioxus_desktop::Config;
|
||||
|
||||
fn main() {
|
||||
LaunchBuilder::new(app).cfg(
|
||||
Config::new().with_custom_head("<style>body { background-color: red; }</style>".into()),
|
||||
);
|
||||
LaunchBuilder::new()
|
||||
.cfg(
|
||||
Config::new().with_custom_head("<style>body { background-color: red; }</style>".into()),
|
||||
)
|
||||
.launch(app);
|
||||
|
||||
LaunchBuilder::new(app).cfg(
|
||||
Config::new().with_custom_index(
|
||||
r#"
|
||||
LaunchBuilder::new()
|
||||
.cfg(
|
||||
Config::new().with_custom_index(
|
||||
r#"
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
@@ -24,9 +27,10 @@ fn main() {
|
||||
</body>
|
||||
</html>
|
||||
"#
|
||||
.into(),
|
||||
),
|
||||
);
|
||||
.into(),
|
||||
),
|
||||
)
|
||||
.launch(app);
|
||||
}
|
||||
|
||||
fn app() -> Element {
|
||||
|
||||
@@ -12,9 +12,9 @@ use dioxus::prelude::*;
|
||||
use dioxus_desktop::{Config, WindowBuilder};
|
||||
|
||||
fn main() {
|
||||
LaunchBuilder::new(app)
|
||||
LaunchBuilder::new()
|
||||
.cfg(Config::new().with_window(WindowBuilder::new().with_resizable(true)))
|
||||
.launch_desktop()
|
||||
.launch(app)
|
||||
}
|
||||
|
||||
const _STYLE: &str = manganis::mg!(file("./examples/assets/fileexplorer.css"));
|
||||
|
||||
@@ -2,12 +2,12 @@ use dioxus::prelude::*;
|
||||
use dioxus_desktop::Config;
|
||||
|
||||
fn main() {
|
||||
LaunchBuilder::new(app)
|
||||
LaunchBuilder::desktop()
|
||||
.cfg(Config::new().with_file_drop_handler(|_w, e| {
|
||||
println!("{e:?}");
|
||||
true
|
||||
}))
|
||||
.launch_desktop()
|
||||
.launch(app)
|
||||
}
|
||||
|
||||
fn app() -> Element {
|
||||
|
||||
+13
-13
@@ -5,19 +5,19 @@ use dioxus_router::prelude::*;
|
||||
fn main() {
|
||||
env_logger::init();
|
||||
|
||||
LaunchBuilder::new(|| {
|
||||
rsx! {
|
||||
Router::<Route> {}
|
||||
}
|
||||
})
|
||||
.cfg(
|
||||
Config::new().with_window(
|
||||
WindowBuilder::new()
|
||||
.with_inner_size(LogicalSize::new(600, 1000))
|
||||
.with_resizable(false),
|
||||
),
|
||||
)
|
||||
.launch_desktop()
|
||||
LaunchBuilder::desktop()
|
||||
.cfg(
|
||||
Config::new().with_window(
|
||||
WindowBuilder::new()
|
||||
.with_inner_size(LogicalSize::new(600, 1000))
|
||||
.with_resizable(false),
|
||||
),
|
||||
)
|
||||
.launch(|| {
|
||||
rsx! {
|
||||
Router::<Route> {}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
#[derive(Routable, Clone)]
|
||||
|
||||
@@ -13,7 +13,7 @@ use dioxus::prelude::*;
|
||||
use dioxus_desktop::Config;
|
||||
|
||||
fn main() {
|
||||
LaunchBuilder::new(app)
|
||||
LaunchBuilder::desktop()
|
||||
.cfg(Config::new().with_prerendered({
|
||||
// We build the dom a first time, then pre-render it to HTML
|
||||
let pre_rendered_dom = VirtualDom::prebuilt(app);
|
||||
@@ -21,7 +21,7 @@ fn main() {
|
||||
// We then launch the app with the pre-rendered HTML
|
||||
dioxus_ssr::pre_render(&pre_rendered_dom)
|
||||
}))
|
||||
.launch_desktop();
|
||||
.launch(app)
|
||||
}
|
||||
|
||||
fn app() -> Element {
|
||||
|
||||
@@ -49,7 +49,7 @@ pub fn main() -> Result<()> {
|
||||
|
||||
// Right now we're going through dioxus-desktop but we'd like to go through dioxus-mobile
|
||||
// That will seed the index.html with some fixes that prevent the page from scrolling/zooming etc
|
||||
LaunchBuilder::new(app).cfg(
|
||||
LaunchBuilder::new().cfg(
|
||||
// Note that we have to disable the viewport goofiness of the browser.
|
||||
// Dioxus_mobile should do this for us
|
||||
Config::default().with_custom_index(include_str!("index.html").to_string()),
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@ use dioxus::prelude::*;
|
||||
use dioxus_desktop::{tao::dpi::PhysicalPosition, LogicalSize, WindowBuilder};
|
||||
|
||||
fn main() {
|
||||
LaunchBuilder::new(app).cfg(make_config());
|
||||
LaunchBuilder::new().cfg(make_config());
|
||||
}
|
||||
|
||||
fn app() -> Element {
|
||||
|
||||
@@ -32,7 +32,7 @@ fn main() {
|
||||
.with_inner_size(LogicalSize::new(320.0, 530.0)),
|
||||
);
|
||||
|
||||
LaunchBuilder::new(app).cfg(cfg);
|
||||
LaunchBuilder::new().cfg(cfg).launch(app);
|
||||
}
|
||||
|
||||
const STYLE: &str = include_str!("./assets/calculator.css");
|
||||
|
||||
@@ -4,7 +4,7 @@ use std::rc::Rc;
|
||||
use dioxus::{html::geometry::euclid::Rect, prelude::*};
|
||||
|
||||
fn main() {
|
||||
LaunchBuilder::new(app).cfg(
|
||||
LaunchBuilder::new().cfg(
|
||||
dioxus_desktop::Config::default().with_custom_head(
|
||||
r#"
|
||||
<style type="text/css">
|
||||
|
||||
@@ -17,7 +17,7 @@ use dioxus::prelude::*;
|
||||
use dioxus_desktop::{Config, LogicalSize, WindowBuilder};
|
||||
|
||||
fn main() {
|
||||
LaunchBuilder::new(app)
|
||||
LaunchBuilder::desktop()
|
||||
.cfg(
|
||||
Config::new().with_window(
|
||||
WindowBuilder::new()
|
||||
@@ -25,7 +25,7 @@ fn main() {
|
||||
.with_inner_size(LogicalSize::new(600.0, 800.0)),
|
||||
),
|
||||
)
|
||||
.launch_desktop()
|
||||
.launch(app)
|
||||
}
|
||||
|
||||
fn app() -> Element {
|
||||
|
||||
@@ -2,7 +2,7 @@ use dioxus::prelude::*;
|
||||
use dioxus_desktop::{window, Config, WindowBuilder};
|
||||
|
||||
fn main() {
|
||||
LaunchBuilder::new(app)
|
||||
LaunchBuilder::desktop()
|
||||
.cfg(
|
||||
Config::new().with_window(
|
||||
WindowBuilder::new()
|
||||
@@ -10,7 +10,7 @@ fn main() {
|
||||
.with_decorations(false),
|
||||
),
|
||||
)
|
||||
.launch_desktop()
|
||||
.launch(app)
|
||||
}
|
||||
|
||||
fn app() -> Element {
|
||||
|
||||
@@ -5,9 +5,9 @@ use dioxus_desktop::use_wry_event_handler;
|
||||
use dioxus_desktop::{Config, WindowCloseBehaviour};
|
||||
|
||||
fn main() {
|
||||
LaunchBuilder::new(app)
|
||||
LaunchBuilder::new()
|
||||
.cfg(Config::new().with_close_behaviour(WindowCloseBehaviour::CloseWindow))
|
||||
.launch_desktop()
|
||||
.launch(app)
|
||||
}
|
||||
|
||||
fn app() -> Element {
|
||||
|
||||
Reference in new issue
Block a user