summaryrefslogtreecommitdiffstats
path: root/winit/src/multi_window/state.rs
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón <hector@hecrj.dev>2024-01-22 11:48:38 +0100
committerLibravatar GitHub <noreply@github.com>2024-01-22 11:48:38 +0100
commit416e0026c021a8222c925979053d985553f947a6 (patch)
treebeb8bb6fd28459d6a0b4c39fb5812f9c126a035e /winit/src/multi_window/state.rs
parent545cc909c9f356dd733d273173694db9b8c28594 (diff)
parente695f7a04c16f786154f25a486b649ddbfd62939 (diff)
downloadiced-416e0026c021a8222c925979053d985553f947a6.tar.gz
iced-416e0026c021a8222c925979053d985553f947a6.tar.bz2
iced-416e0026c021a8222c925979053d985553f947a6.zip
Merge pull request #2209 from iced-rs/remove-associated-theme
`Themer` widget
Diffstat (limited to 'winit/src/multi_window/state.rs')
-rw-r--r--winit/src/multi_window/state.rs11
1 files changed, 5 insertions, 6 deletions
diff --git a/winit/src/multi_window/state.rs b/winit/src/multi_window/state.rs
index 235771f4..2e97a13d 100644
--- a/winit/src/multi_window/state.rs
+++ b/winit/src/multi_window/state.rs
@@ -1,5 +1,4 @@
use crate::conversion;
-use crate::core;
use crate::core::{mouse, window};
use crate::core::{Color, Size};
use crate::graphics::Viewport;
@@ -14,7 +13,7 @@ use winit::window::Window;
/// The state of a multi-windowed [`Application`].
pub struct State<A: Application>
where
- <A::Renderer as core::Renderer>::Theme: application::StyleSheet,
+ A::Theme: application::StyleSheet,
{
title: String,
scale_factor: f64,
@@ -22,13 +21,13 @@ where
viewport_version: u64,
cursor_position: Option<winit::dpi::PhysicalPosition<f64>>,
modifiers: winit::keyboard::ModifiersState,
- theme: <A::Renderer as core::Renderer>::Theme,
+ theme: A::Theme,
appearance: application::Appearance,
}
impl<A: Application> Debug for State<A>
where
- <A::Renderer as core::Renderer>::Theme: application::StyleSheet,
+ A::Theme: application::StyleSheet,
{
fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
f.debug_struct("multi_window::State")
@@ -44,7 +43,7 @@ where
impl<A: Application> State<A>
where
- <A::Renderer as core::Renderer>::Theme: application::StyleSheet,
+ A::Theme: application::StyleSheet,
{
/// Creates a new [`State`] for the provided [`Application`]'s `window`.
pub fn new(
@@ -124,7 +123,7 @@ where
}
/// Returns the current theme of the [`State`].
- pub fn theme(&self) -> &<A::Renderer as core::Renderer>::Theme {
+ pub fn theme(&self) -> &A::Theme {
&self.theme
}