Add background_color to Application and Sandbox

This commit is contained in:
Héctor Ramón Jiménez 2020-06-12 22:12:15 +02:00
parent 2a516dfc48
commit 4c0286e8ac
11 changed files with 81 additions and 17 deletions

View file

@ -35,6 +35,6 @@ pub use transformation::Transformation;
pub use viewport::Viewport;
pub use iced_native::{
Background, Font, HorizontalAlignment, Point, Rectangle, Size, Vector,
VerticalAlignment,
Background, Color, Font, HorizontalAlignment, Point, Rectangle, Size,
Vector, VerticalAlignment,
};

View file

@ -1,4 +1,4 @@
use crate::Viewport;
use crate::{Color, Viewport};
use iced_native::mouse;
use raw_window_handle::HasRawWindowHandle;
@ -49,6 +49,7 @@ pub trait Compositor: Sized {
renderer: &mut Self::Renderer,
swap_chain: &mut Self::SwapChain,
viewport: &Viewport,
background_color: Color,
output: &<Self::Renderer as iced_native::Renderer>::Output,
overlay: &[T],
) -> mouse::Interaction;

View file

@ -1,4 +1,4 @@
use crate::{Size, Viewport};
use crate::{Color, Size, Viewport};
use iced_native::mouse;
use core::ffi::c_void;
@ -61,6 +61,7 @@ pub trait GLCompositor: Sized {
&mut self,
renderer: &mut Self::Renderer,
viewport: &Viewport,
background_color: Color,
output: &<Self::Renderer as iced_native::Renderer>::Output,
overlay: &[T],
) -> mouse::Interaction;