summaryrefslogtreecommitdiffstats
path: root/winit/src/multi_window.rs
diff options
context:
space:
mode:
Diffstat (limited to 'winit/src/multi_window.rs')
-rw-r--r--winit/src/multi_window.rs18
1 files changed, 9 insertions, 9 deletions
diff --git a/winit/src/multi_window.rs b/winit/src/multi_window.rs
index 19951ed3..ec2f86ea 100644
--- a/winit/src/multi_window.rs
+++ b/winit/src/multi_window.rs
@@ -22,7 +22,7 @@ use crate::runtime::user_interface::{self, UserInterface};
use crate::runtime::Debug;
use crate::{Clipboard, Error, Proxy, Settings};
-pub use crate::application::{default, Appearance, Style};
+pub use crate::application::{default, Appearance, DefaultStyle};
use std::collections::HashMap;
use std::mem::ManuallyDrop;
@@ -42,7 +42,7 @@ use std::time::Instant;
/// can be toggled by pressing `F12`.
pub trait Application: Program
where
- Style<Self::Theme>: Default,
+ Self::Theme: DefaultStyle,
{
/// The data needed to initialize your [`Application`].
type Flags;
@@ -68,7 +68,7 @@ where
/// Returns the `Style` variation of the `Theme`.
fn style(&self, theme: &Self::Theme) -> Appearance {
- Style::default().resolve(theme)
+ theme.default_style()
}
/// Returns the event `Subscription` for the current state of the
@@ -109,7 +109,7 @@ where
A: Application + 'static,
E: Executor + 'static,
C: Compositor<Renderer = A::Renderer> + 'static,
- Style<A::Theme>: Default,
+ A::Theme: DefaultStyle,
{
use winit::event_loop::EventLoopBuilder;
@@ -350,7 +350,7 @@ async fn run_instance<A, E, C>(
A: Application + 'static,
E: Executor + 'static,
C: Compositor<Renderer = A::Renderer> + 'static,
- Style<A::Theme>: Default,
+ A::Theme: DefaultStyle,
{
use winit::event;
use winit::event_loop::ControlFlow;
@@ -820,7 +820,7 @@ fn build_user_interface<'a, A: Application>(
id: window::Id,
) -> UserInterface<'a, A::Message, A::Theme, A::Renderer>
where
- Style<A::Theme>: Default,
+ A::Theme: DefaultStyle,
{
debug.view_started();
let view = application.view(id);
@@ -848,7 +848,7 @@ fn update<A: Application, C, E: Executor>(
ui_caches: &mut HashMap<window::Id, user_interface::Cache>,
) where
C: Compositor<Renderer = A::Renderer> + 'static,
- Style<A::Theme>: Default,
+ A::Theme: DefaultStyle,
{
for message in messages.drain(..) {
debug.log_message(&message);
@@ -891,7 +891,7 @@ fn run_command<A, C, E>(
A: Application,
E: Executor,
C: Compositor<Renderer = A::Renderer> + 'static,
- Style<A::Theme>: Default,
+ A::Theme: DefaultStyle,
{
use crate::runtime::clipboard;
use crate::runtime::system;
@@ -1218,7 +1218,7 @@ pub fn build_user_interfaces<'a, A: Application, C: Compositor>(
) -> HashMap<window::Id, UserInterface<'a, A::Message, A::Theme, A::Renderer>>
where
C: Compositor<Renderer = A::Renderer>,
- Style<A::Theme>: Default,
+ A::Theme: DefaultStyle,
{
cached_user_interfaces
.drain()