diff options
Diffstat (limited to 'winit/src')
-rw-r--r-- | winit/src/application.rs | 2 | ||||
-rw-r--r-- | winit/src/settings.rs | 23 |
2 files changed, 23 insertions, 2 deletions
diff --git a/winit/src/application.rs b/winit/src/application.rs index 3fdec658..9781a453 100644 --- a/winit/src/application.rs +++ b/winit/src/application.rs @@ -157,7 +157,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/settings.rs b/winit/src/settings.rs index 45f38833..78d58000 100644 --- a/winit/src/settings.rs +++ b/winit/src/settings.rs @@ -23,9 +23,12 @@ pub use platform::PlatformSpecific; use crate::conversion; 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> { @@ -59,7 +62,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), @@ -95,6 +98,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( |