iced icon indicating copy to clipboard operation
iced copied to clipboard

window icon on macos

Open samsabed opened this issue 1 year ago • 0 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues.

Is this issue related to iced?

  • [X] My hardware is compatible and my graphics drivers are up-to-date.

What happened?

using git head

let icon = Icon::from_file_data(icon_data, Some(image::ImageFormat::Png));

returns

Ok(
    Icon(
        NoIcon,
    ),
)

from https://github.com/rust-windowing/winit

/// For platforms which don't have window icons (e.g. web)
#[derive(Debug, Clone, PartialEq, Eq)]
pub(crate) struct NoIcon;

    impl NoIcon {
        pub fn from_rgba(rgba: Vec<u8>, width: u32, height: u32) -> Result<Self, BadIcon> {
            // Create the rgba icon anyway to validate the input
            let _ = RgbaIcon::from_rgba(rgba, width, height)?;
            Ok(NoIcon)
        }
    }

rustc 1.64.0 (a55dd71d5 2022-09-19)

What is the expected behavior?

let icon = Icon::from_file_data(icon_data, Some(image::ImageFormat::Png));

returns an icon and the window shows it

Version

master

Operative System

macOS

Do you have any log output?

Ok(
    Icon(
        NoIcon,
    ),
)

samsabed avatar Oct 08 '22 11:10 samsabed