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"
|
directories = "5.0.0"
|
||||||
dirs = "5.0.0"
|
dirs = "5.0.0"
|
||||||
ez-pixmap = "0.2.2"
|
ez-pixmap = "0.2.2"
|
||||||
freedesktop-icons = "0.2.3"
|
freedesktop-icons-greedy = "0.2.5"
|
||||||
glam = { version = "0.24.0", features = ["mint"] }
|
glam = { version = "0.24.0", features = ["mint"] }
|
||||||
image = "0.24.5"
|
image = "0.24.5"
|
||||||
lazy_static = "1.4.0"
|
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"] }
|
tracing-subscriber = { version = "0.3.16", features = ["env-filter"] }
|
||||||
tween = "2.0.0"
|
tween = "2.0.0"
|
||||||
ustr = "0.9.0"
|
ustr = "0.9.0"
|
||||||
walkdir = "2.3.2"
|
walkdir = "2.3.3"
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
tempdir = "0.3.7"
|
tempdir = "0.3.7"
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
use color_eyre::eyre::Result;
|
use color_eyre::eyre::Result;
|
||||||
use freedesktop_icons::lookup;
|
use freedesktop_icons_greedy::lookup;
|
||||||
use lazy_static::lazy_static;
|
use lazy_static::lazy_static;
|
||||||
use regex::Regex;
|
use regex::Regex;
|
||||||
use resvg::render;
|
use resvg::render;
|
||||||
@@ -243,7 +243,6 @@ impl DesktopFile {
|
|||||||
return Some(icon);
|
return Some(icon);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
print!("Cache miss")
|
|
||||||
}
|
}
|
||||||
|
|
||||||
let preferred_theme = match linicon_theme::get_icon_theme() {
|
let preferred_theme = match linicon_theme::get_icon_theme() {
|
||||||
@@ -254,7 +253,7 @@ impl DesktopFile {
|
|||||||
if let Some(icon_path) = lookup(icon_name)
|
if let Some(icon_path) = lookup(icon_name)
|
||||||
.with_size(preferred_px_size)
|
.with_size(preferred_px_size)
|
||||||
.with_theme(preferred_theme.as_str())
|
.with_theme(preferred_theme.as_str())
|
||||||
.with_cache()
|
.with_greed()
|
||||||
.find()
|
.find()
|
||||||
{
|
{
|
||||||
if let Some(icon) = Icon::from_path(icon_path, preferred_px_size) {
|
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)
|
if let Some(icon_path) = lookup(icon_name)
|
||||||
.with_size(icon_size)
|
.with_size(icon_size)
|
||||||
.with_theme(preferred_theme.as_str())
|
.with_theme(preferred_theme.as_str())
|
||||||
.with_cache()
|
.with_greed()
|
||||||
.find()
|
.find()
|
||||||
{
|
{
|
||||||
if let Some(icon) = Icon::from_path(icon_path, preferred_px_size) {
|
if let Some(icon) = Icon::from_path(icon_path, preferred_px_size) {
|
||||||
@@ -317,7 +316,6 @@ impl Icon {
|
|||||||
.to_owned(),
|
.to_owned(),
|
||||||
size,
|
size,
|
||||||
)) {
|
)) {
|
||||||
print!("Saving in the cache");
|
|
||||||
IMAGE_CACHE.lock().unwrap().insert(
|
IMAGE_CACHE.lock().unwrap().insert(
|
||||||
(
|
(
|
||||||
self.path
|
self.path
|
||||||
|
|||||||
Reference in New Issue
Block a user