From 582bc7d36e9f45b9baf9b41fd24ca29af451601f Mon Sep 17 00:00:00 2001 From: Paul-Christian Volkmer Date: Fri, 24 Jan 2025 16:30:52 +0100 Subject: [PATCH] refactor: use icon::from_file_data() --- ui/Cargo.toml | 1 - ui/src/main.rs | 6 +----- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/ui/Cargo.toml b/ui/Cargo.toml index 7bd2235..d355f7c 100644 --- a/ui/Cargo.toml +++ b/ui/Cargo.toml @@ -8,7 +8,6 @@ cert-tools = { path = "..", version = "*" } iced = { version = "0.13", features = ["wgpu", "tiny-skia", "tokio", "web-colors", "image"], default-features = false } rfd = "0.15" itertools = "0.14" -image = {version = "0.25", features = ["ico"], default-features = false } [build-dependencies] winresource = "0.1" \ No newline at end of file diff --git a/ui/src/main.rs b/ui/src/main.rs index 4514c91..c6a02df 100644 --- a/ui/src/main.rs +++ b/ui/src/main.rs @@ -26,7 +26,6 @@ use iced::widget::{ self, button, column, container, horizontal_rule, horizontal_space, row, text, text_editor, text_input, Container, Scrollable, }; -use iced::window::icon; use iced::{ alignment, application, clipboard, color, window, Background, Border, Color, Element, Font, Length, Pixels, Settings, Size, Task, @@ -42,10 +41,7 @@ fn main() -> iced::Result { ..Settings::default() }) .window(window::Settings { - icon: match image::load_from_memory(include_bytes!("../../resources/icon.ico")) { - Ok(image) => icon::from_rgba(image.as_bytes().to_vec(), 128, 128).ok(), - _ => None, - }, + icon: window::icon::from_file_data(include_bytes!("../../resources/icon.ico"), None).ok(), ..window::Settings::default() }) .resizable(false)