cache icon

This commit is contained in:
Nova
2023-05-15 03:53:10 -04:00
parent 8bfd113752
commit 836f3d936f
3 changed files with 3 additions and 4 deletions

Binary file not shown.

View File

@@ -16,7 +16,7 @@ use stardust_xr_fusion::{
}; };
use stardust_xr_molecules::{GrabData, Grabbable}; use stardust_xr_molecules::{GrabData, Grabbable};
use std::f32::consts::PI; use std::f32::consts::PI;
use tween::{QuartInOut, Tweener};
const APP_LIMIT: usize = 300; const APP_LIMIT: usize = 300;
const APP_SIZE: f32 = 0.05; const APP_SIZE: f32 = 0.05;

View File

@@ -255,15 +255,14 @@ impl DesktopFile {
print!("Cache miss") print!("Cache miss")
} }
// TODO: handle preferred_theme if let Some(icon_path) = lookup(icon_name).with_size(preferred_px_size).with_cache().find() {
if let Some(icon_path) = lookup(icon_name).with_size(preferred_px_size).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) {
return Some(icon); return Some(icon);
} }
} }
for icon_size in ICON_SIZES { for icon_size in ICON_SIZES {
if let Some(icon_path) = lookup(icon_name).with_size(icon_size).find() { if let Some(icon_path) = lookup(icon_name).with_size(icon_size).with_cache().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) {
return Some(icon); return Some(icon);
} }