summaryrefslogtreecommitdiffstats
path: root/glutin
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2022-05-25 05:01:18 +0200
committerLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2022-05-25 05:01:18 +0200
commit03eda9b162012c503ead649e5ccb95b7ef1d10ed (patch)
treea134dbab97011c0a465f4527d2ae0bb771f51554 /glutin
parent2cfb307f8c3927a0876c6b754a5d7d673b9edfee (diff)
downloadiced-03eda9b162012c503ead649e5ccb95b7ef1d10ed.tar.gz
iced-03eda9b162012c503ead649e5ccb95b7ef1d10ed.tar.bz2
iced-03eda9b162012c503ead649e5ccb95b7ef1d10ed.zip
Let a `Theme` control the background color of an application
... and remove `Application::background_color`
Diffstat (limited to 'glutin')
-rw-r--r--glutin/src/application.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/glutin/src/application.rs b/glutin/src/application.rs
index d93059e5..7a5d78ea 100644
--- a/glutin/src/application.rs
+++ b/glutin/src/application.rs
@@ -9,6 +9,7 @@ use iced_winit::application;
use iced_winit::conversion;
use iced_winit::futures;
use iced_winit::futures::channel::mpsc;
+use iced_winit::theme::{self, Definition as _};
use iced_winit::user_interface;
use iced_winit::{Clipboard, Debug, Proxy, Settings};
@@ -25,6 +26,7 @@ where
A: Application + 'static,
E: Executor + 'static,
C: window::GLCompositor<Renderer = A::Renderer> + 'static,
+ <A::Renderer as iced_native::Renderer>::Theme: theme::Definition,
{
use futures::task;
use futures::Future;
@@ -203,6 +205,7 @@ async fn run_instance<A, E, C>(
A: Application + 'static,
E: Executor + 'static,
C: window::GLCompositor<Renderer = A::Renderer> + 'static,
+ <A::Renderer as iced_native::Renderer>::Theme: theme::Definition,
{
use glutin::event;
use iced_winit::futures::stream::StreamExt;
@@ -376,7 +379,7 @@ async fn run_instance<A, E, C>(
compositor.present(
&mut renderer,
state.viewport(),
- state.background_color(),
+ theme.background_color(),
&debug.overlay(),
);