chore: enable ico and xpm image support for desktop feature
This commit is contained in:
parent
46d9f0c344
commit
3d8d8915be
2 changed files with 9 additions and 0 deletions
|
|
@ -58,6 +58,7 @@ desktop = [
|
||||||
"process",
|
"process",
|
||||||
"dep:cosmic-settings-config",
|
"dep:cosmic-settings-config",
|
||||||
"dep:freedesktop-desktop-entry",
|
"dep:freedesktop-desktop-entry",
|
||||||
|
"dep:image-extras",
|
||||||
"dep:mime",
|
"dep:mime",
|
||||||
"dep:shlex",
|
"dep:shlex",
|
||||||
"tokio?/io-util",
|
"tokio?/io-util",
|
||||||
|
|
@ -141,9 +142,14 @@ css-color = "0.2.8"
|
||||||
derive_setters = "0.1.9"
|
derive_setters = "0.1.9"
|
||||||
futures = "0.3"
|
futures = "0.3"
|
||||||
image = { version = "0.25.10", default-features = false, features = [
|
image = { version = "0.25.10", default-features = false, features = [
|
||||||
|
"ico",
|
||||||
"jpeg",
|
"jpeg",
|
||||||
"png",
|
"png",
|
||||||
] }
|
] }
|
||||||
|
image-extras = { version = "0.1.0", default-features = false, features = [
|
||||||
|
"xpm",
|
||||||
|
"xbm",
|
||||||
|
], optional = true }
|
||||||
libc = { version = "0.2.183", optional = true }
|
libc = { version = "0.2.183", optional = true }
|
||||||
log = "0.4"
|
log = "0.4"
|
||||||
mime = { version = "0.3.17", optional = true }
|
mime = { version = "0.3.17", optional = true }
|
||||||
|
|
|
||||||
|
|
@ -128,6 +128,9 @@ impl<A: crate::app::Application> BootFn<cosmic::Cosmic<A>, crate::Action<A::Mess
|
||||||
///
|
///
|
||||||
/// Returns error on application failure.
|
/// Returns error on application failure.
|
||||||
pub fn run<App: Application>(settings: Settings, flags: App::Flags) -> iced::Result {
|
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")))]
|
#[cfg(all(target_env = "gnu", not(target_os = "windows")))]
|
||||||
if let Some(threshold) = settings.default_mmap_threshold {
|
if let Some(threshold) = settings.default_mmap_threshold {
|
||||||
crate::malloc::limit_mmap_threshold(threshold);
|
crate::malloc::limit_mmap_threshold(threshold);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue