switched to greedy freedesktop-icons implementation
This commit is contained in:
641
Cargo.lock
generated
641
Cargo.lock
generated
File diff suppressed because it is too large
Load Diff
@@ -10,7 +10,7 @@ color-eyre = "0.6.2"
|
||||
directories = "5.0.0"
|
||||
dirs = "5.0.0"
|
||||
ez-pixmap = "0.2.2"
|
||||
freedesktop-icons = "0.2.3"
|
||||
freedesktop-icons-greedy = "0.2.5"
|
||||
glam = { version = "0.24.0", features = ["mint"] }
|
||||
image = "0.24.5"
|
||||
lazy_static = "1.4.0"
|
||||
@@ -30,7 +30,7 @@ tokio = { version = "1.24.1", features = ["full"] }
|
||||
tracing-subscriber = { version = "0.3.16", features = ["env-filter"] }
|
||||
tween = "2.0.0"
|
||||
ustr = "0.9.0"
|
||||
walkdir = "2.3.2"
|
||||
walkdir = "2.3.3"
|
||||
|
||||
[dev-dependencies]
|
||||
tempdir = "0.3.7"
|
||||
@@ -1,5 +1,5 @@
|
||||
use color_eyre::eyre::Result;
|
||||
use freedesktop_icons::lookup;
|
||||
use freedesktop_icons_greedy::lookup;
|
||||
use lazy_static::lazy_static;
|
||||
use regex::Regex;
|
||||
use resvg::render;
|
||||
@@ -243,7 +243,6 @@ impl DesktopFile {
|
||||
return Some(icon);
|
||||
}
|
||||
}
|
||||
print!("Cache miss")
|
||||
}
|
||||
|
||||
let preferred_theme = match linicon_theme::get_icon_theme() {
|
||||
@@ -254,7 +253,7 @@ impl DesktopFile {
|
||||
if let Some(icon_path) = lookup(icon_name)
|
||||
.with_size(preferred_px_size)
|
||||
.with_theme(preferred_theme.as_str())
|
||||
.with_cache()
|
||||
.with_greed()
|
||||
.find()
|
||||
{
|
||||
if let Some(icon) = Icon::from_path(icon_path, preferred_px_size) {
|
||||
@@ -266,7 +265,7 @@ impl DesktopFile {
|
||||
if let Some(icon_path) = lookup(icon_name)
|
||||
.with_size(icon_size)
|
||||
.with_theme(preferred_theme.as_str())
|
||||
.with_cache()
|
||||
.with_greed()
|
||||
.find()
|
||||
{
|
||||
if let Some(icon) = Icon::from_path(icon_path, preferred_px_size) {
|
||||
@@ -317,7 +316,6 @@ impl Icon {
|
||||
.to_owned(),
|
||||
size,
|
||||
)) {
|
||||
print!("Saving in the cache");
|
||||
IMAGE_CACHE.lock().unwrap().insert(
|
||||
(
|
||||
self.path
|
||||
|
||||
Reference in New Issue
Block a user