From 421552dea1c06e876d5999333794b9ee918340a1 Mon Sep 17 00:00:00 2001 From: Michael Aaron Murphy Date: Tue, 6 Jan 2026 02:25:46 +0100 Subject: [PATCH] fix!(desktop): IconSourceExt::as_cosmic_icon should return Handle with SVG preference --- src/desktop.rs | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/desktop.rs b/src/desktop.rs index 01698af5..0d3dbb52 100644 --- a/src/desktop.rs +++ b/src/desktop.rs @@ -7,23 +7,22 @@ use std::path::{Path, PathBuf}; use std::{borrow::Cow, collections::HashSet, ffi::OsStr}; pub trait IconSourceExt { - fn as_cosmic_icon(&self) -> crate::widget::icon::Icon; + fn as_cosmic_icon(&self) -> crate::widget::icon::Handle; } #[cfg(not(windows))] impl IconSourceExt for fde::IconSource { - fn as_cosmic_icon(&self) -> crate::widget::icon::Icon { + fn as_cosmic_icon(&self) -> crate::widget::icon::Handle { match self { fde::IconSource::Name(name) => crate::widget::icon::from_name(name.as_str()) + .prefer_svg(true) .size(128) .fallback(Some(crate::widget::icon::IconFallback::Names(vec![ "application-default".into(), "application-x-executable".into(), ]))) - .into(), - fde::IconSource::Path(path) => { - crate::widget::icon(crate::widget::icon::from_path(path.clone())) - } + .handle(), + fde::IconSource::Path(path) => crate::widget::icon::from_path(path.clone()), } } }