diff options
| author | 2020-01-09 18:46:06 +0100 | |
|---|---|---|
| committer | 2020-01-09 18:46:06 +0100 | |
| commit | 0a8302450557877cb667b51fc84383aaf0a11b02 (patch) | |
| tree | fe3a8a6b0ae82f7fd1fa0c0de34b4b09d0b9edda /winit/src/application.rs | |
| parent | 6699329d3f91c5b9d8e8e55ad88de24bd3894955 (diff) | |
| parent | 7b278755fc7929633b5771824beac4d39b16e82e (diff) | |
| download | iced-0a8302450557877cb667b51fc84383aaf0a11b02.tar.gz iced-0a8302450557877cb667b51fc84383aaf0a11b02.tar.bz2 iced-0a8302450557877cb667b51fc84383aaf0a11b02.zip  | |
Merge pull request #146 from hecrj/feature/custom-styling
Custom styling
Diffstat (limited to 'winit/src/application.rs')
| -rw-r--r-- | winit/src/application.rs | 12 | 
1 files changed, 7 insertions, 5 deletions
diff --git a/winit/src/application.rs b/winit/src/application.rs index a8612b1a..da943660 100644 --- a/winit/src/application.rs +++ b/winit/src/application.rs @@ -1,5 +1,5 @@  use crate::{ -    conversion, +    container, conversion,      input::{keyboard, mouse},      renderer::{Target, Windowed},      subscription, Cache, Clipboard, Command, Container, Debug, Element, Event, @@ -18,7 +18,7 @@ pub trait Application: Sized {      /// The renderer to use to draw the [`Application`].      ///      /// [`Application`]: trait.Application.html -    type Renderer: Windowed; +    type Renderer: Windowed + container::Renderer;      /// The type of __messages__ your [`Application`] will produce.      /// @@ -81,8 +81,10 @@ pub trait Application: Sized {      /// It should probably be that last thing you call in your `main` function.      ///      /// [`Application`]: trait.Application.html -    fn run(settings: Settings) -    where +    fn run( +        settings: Settings, +        renderer_settings: <Self::Renderer as Windowed>::Settings, +    ) where          Self: 'static,      {          use winit::{ @@ -140,7 +142,7 @@ pub trait Application: Sized {          let mut resized = false;          let clipboard = Clipboard::new(&window); -        let mut renderer = Self::Renderer::new(); +        let mut renderer = Self::Renderer::new(renderer_settings);          let mut target = {              let (width, height) = to_physical(size, dpi);  | 
