chore: enable ico and xpm image support for desktop feature

This commit is contained in:
Hojjat 2026-04-14 23:14:41 -06:00 committed by Michael Murphy
parent 46d9f0c344
commit 3d8d8915be
2 changed files with 9 additions and 0 deletions

View file

@ -58,6 +58,7 @@ desktop = [
"process",
"dep:cosmic-settings-config",
"dep:freedesktop-desktop-entry",
"dep:image-extras",
"dep:mime",
"dep:shlex",
"tokio?/io-util",
@ -141,9 +142,14 @@ css-color = "0.2.8"
derive_setters = "0.1.9"
futures = "0.3"
image = { version = "0.25.10", default-features = false, features = [
"ico",
"jpeg",
"png",
] }
image-extras = { version = "0.1.0", default-features = false, features = [
"xpm",
"xbm",
], optional = true }
libc = { version = "0.2.183", optional = true }
log = "0.4"
mime = { version = "0.3.17", optional = true }

View file

@ -128,6 +128,9 @@ impl<A: crate::app::Application> BootFn<cosmic::Cosmic<A>, crate::Action<A::Mess
///
/// Returns error on application failure.
pub fn run<App: Application>(settings: Settings, flags: App::Flags) -> iced::Result {
#[cfg(feature = "desktop")]
image_extras::register();
#[cfg(all(target_env = "gnu", not(target_os = "windows")))]
if let Some(threshold) = settings.default_mmap_threshold {
crate::malloc::limit_mmap_threshold(threshold);