summaryrefslogtreecommitdiffstats
path: root/src/application.rs
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2019-11-25 14:17:13 +0100
committerLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2019-11-25 14:17:13 +0100
commitd70021fa68b556e20638f29e2e303f6d156afdb6 (patch)
treeddc0f00151b1ec71610e60045812493153788632 /src/application.rs
parente72b5ceeb8c6461a34e85909a48debf46505d00a (diff)
downloadiced-d70021fa68b556e20638f29e2e303f6d156afdb6.tar.gz
iced-d70021fa68b556e20638f29e2e303f6d156afdb6.tar.bz2
iced-d70021fa68b556e20638f29e2e303f6d156afdb6.zip
Allow `Application` configuration with `Settings`
Diffstat (limited to 'src/application.rs')
-rw-r--r--src/application.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/application.rs b/src/application.rs
index f6d3fb90..a4d20e68 100644
--- a/src/application.rs
+++ b/src/application.rs
@@ -1,4 +1,4 @@
-use crate::{Command, Element};
+use crate::{Command, Element, Settings};
/// An interactive cross-platform application.
///
@@ -19,10 +19,10 @@ use crate::{Command, Element};
/// before](index.html#overview). We just need to fill in the gaps:
///
/// ```no_run
-/// use iced::{button, Application, Button, Column, Command, Element, Text};
+/// use iced::{button, Application, Button, Column, Command, Element, Settings, Text};
///
/// pub fn main() {
-/// Counter::run()
+/// Counter::run(Settings::default())
/// }
///
/// #[derive(Default)]
@@ -132,12 +132,12 @@ pub trait Application: Sized {
/// It should probably be that last thing you call in your `main` function.
///
/// [`Application`]: trait.Application.html
- fn run()
+ fn run(settings: Settings)
where
Self: 'static,
{
#[cfg(not(target_arch = "wasm32"))]
- <Instance<Self> as iced_winit::Application>::run();
+ <Instance<Self> as iced_winit::Application>::run(settings.into());
#[cfg(target_arch = "wasm32")]
<Instance<Self> as iced_web::Application>::run();