Merge remote-tracking branch 'iced-main/master' into feat/multi-window-support
# Conflicts: # glutin/src/application.rs # winit/src/icon.rs
This commit is contained in:
commit
51296572c0
16 changed files with 79 additions and 103 deletions
|
|
@ -155,7 +155,7 @@ where
|
|||
)
|
||||
.with_visible(false);
|
||||
|
||||
log::info!("Window builder: {:#?}", builder);
|
||||
log::debug!("Window builder: {:#?}", builder);
|
||||
|
||||
let window = builder
|
||||
.build(&event_loop)
|
||||
|
|
|
|||
|
|
@ -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(
|
||||
|
|
|
|||
|
|
@ -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(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue