diff options
author | 2023-02-28 13:08:30 -0800 | |
---|---|---|
committer | 2023-02-28 13:08:30 -0800 | |
commit | 51296572c0189eaef8081c46270ff48b7e03258d (patch) | |
tree | 067b3a9102f92e4869f2a63d739a49379a9fb481 /winit | |
parent | a131f11a23d3430df58bf67a7c89f4b2284822af (diff) | |
parent | 86b85d1436a44e82a9765f9d82b026faf26e22de (diff) | |
download | iced-51296572c0189eaef8081c46270ff48b7e03258d.tar.gz iced-51296572c0189eaef8081c46270ff48b7e03258d.tar.bz2 iced-51296572c0189eaef8081c46270ff48b7e03258d.zip |
Merge remote-tracking branch 'iced-main/master' into feat/multi-window-support
# Conflicts:
# glutin/src/application.rs
# winit/src/icon.rs
Diffstat (limited to 'winit')
-rw-r--r-- | winit/src/application.rs | 2 | ||||
-rw-r--r-- | winit/src/icon.rs | 8 | ||||
-rw-r--r-- | winit/src/settings.rs | 23 |
3 files changed, 30 insertions, 3 deletions
diff --git a/winit/src/application.rs b/winit/src/application.rs index 3123a318..58556da4 100644 --- a/winit/src/application.rs +++ b/winit/src/application.rs @@ -155,7 +155,7 @@ where ) .with_visible(false); - log::info!("Window builder: {:#?}", builder); + log::debug!("Window builder: {:#?}", builder); let window = builder .build(&event_loop) diff --git a/winit/src/icon.rs b/winit/src/icon.rs index 73b4e037..4113d9d0 100644 --- a/winit/src/icon.rs +++ b/winit/src/icon.rs @@ -6,9 +6,15 @@ use std::io; use std::path::Path; /// The icon of a window. -#[derive(Debug, Clone)] +#[derive(Clone)] pub struct Icon(winit::window::Icon); +impl fmt::Debug for Icon { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + f.debug_tuple("Icon").field(&format_args!("_")).finish() + } +} + impl Icon { /// Creates an icon from 32bpp RGBA data. pub fn from_rgba( diff --git a/winit/src/settings.rs b/winit/src/settings.rs index 2f73aff6..b26de542 100644 --- a/winit/src/settings.rs +++ b/winit/src/settings.rs @@ -24,9 +24,12 @@ pub use platform::PlatformSpecific; use crate::conversion; use crate::Icon; use crate::Position; + use winit::monitor::MonitorHandle; use winit::window::WindowBuilder; +use std::fmt; + /// The settings of an application. #[derive(Debug, Clone, Default)] pub struct Settings<Flags> { @@ -64,7 +67,7 @@ pub struct Settings<Flags> { } /// The window settings of an application. -#[derive(Debug, Clone)] +#[derive(Clone)] pub struct Window { /// The size of the window. pub size: (u32, u32), @@ -100,6 +103,24 @@ pub struct Window { pub platform_specific: platform::PlatformSpecific, } +impl fmt::Debug for Window { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + f.debug_struct("Window") + .field("size", &self.size) + .field("position", &self.position) + .field("min_size", &self.min_size) + .field("max_size", &self.max_size) + .field("visible", &self.visible) + .field("resizable", &self.resizable) + .field("decorations", &self.decorations) + .field("transparent", &self.transparent) + .field("always_on_top", &self.always_on_top) + .field("icon", &self.icon.is_some()) + .field("platform_specific", &self.platform_specific) + .finish() + } +} + impl Window { /// Converts the window settings into a `WindowBuilder` from `winit`. pub fn into_builder( |