summaryrefslogtreecommitdiffstats
path: root/winit/src/application.rs
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón <hector0193@gmail.com>2019-11-14 06:46:50 +0100
committerLibravatar GitHub <noreply@github.com>2019-11-14 06:46:50 +0100
commitbc8d347736ec997ec0e0c401289e2bc09e212b8a (patch)
treeb98798c09a3aa914b7d0869fba0cfd3efff7754f /winit/src/application.rs
parent839e039dbf2fb89dcb8c141503740777d2af2eb3 (diff)
parent73f3c900071f950ea914652ca3f0002c1e173f61 (diff)
downloadiced-bc8d347736ec997ec0e0c401289e2bc09e212b8a.tar.gz
iced-bc8d347736ec997ec0e0c401289e2bc09e212b8a.tar.bz2
iced-bc8d347736ec997ec0e0c401289e2bc09e212b8a.zip
Merge pull request #52 from hecrj/custom-layout-engine
Custom layout engine
Diffstat (limited to 'winit/src/application.rs')
-rw-r--r--winit/src/application.rs16
1 files changed, 8 insertions, 8 deletions
diff --git a/winit/src/application.rs b/winit/src/application.rs
index 4deffecc..331bafa0 100644
--- a/winit/src/application.rs
+++ b/winit/src/application.rs
@@ -1,12 +1,13 @@
use crate::{
- column, conversion,
+ conversion,
input::{keyboard, mouse},
renderer::{Target, Windowed},
- Cache, Column, Debug, Element, Event, Length, MouseCursor, UserInterface,
+ Cache, Container, Debug, Element, Event, Length, MouseCursor,
+ UserInterface,
};
pub trait Application {
- type Renderer: Windowed + column::Renderer;
+ type Renderer: Windowed;
type Message: std::fmt::Debug;
@@ -60,7 +61,7 @@ pub trait Application {
let user_interface = UserInterface::build(
document(&mut self, size, &mut debug),
Cache::default(),
- &renderer,
+ &mut renderer,
);
debug.layout_finished();
@@ -86,7 +87,7 @@ pub trait Application {
let mut user_interface = UserInterface::build(
document(&mut self, size, &mut debug),
cache.take().unwrap(),
- &renderer,
+ &mut renderer,
);
debug.layout_finished();
@@ -129,7 +130,7 @@ pub trait Application {
let user_interface = UserInterface::build(
document(&mut self, size, &mut debug),
temp_cache,
- &renderer,
+ &mut renderer,
);
debug.layout_finished();
@@ -282,9 +283,8 @@ where
let view = application.view();
debug.view_finished();
- Column::new()
+ Container::new(view)
.width(Length::Units(size.width.round() as u16))
.height(Length::Units(size.height.round() as u16))
- .push(view)
.into()
}