fix: Add fallback for icons without theme
This commit is contained in:
parent
cbc57c1fa0
commit
8998813d01
1 changed files with 10 additions and 0 deletions
10
src/lib.rs
10
src/lib.rs
|
|
@ -267,6 +267,16 @@ impl<'a> LookupBuilder<'a> {
|
|||
}
|
||||
None
|
||||
})
|
||||
.or_else(|| {
|
||||
for theme_base_dir in BASE_PATHS.iter() {
|
||||
if let Some(icon) =
|
||||
try_build_icon_path(self.name, theme_base_dir, self.force_svg)
|
||||
{
|
||||
return Some(icon);
|
||||
}
|
||||
}
|
||||
None
|
||||
})
|
||||
.or_else(|| try_build_icon_path(self.name, "/usr/share/pixmaps", self.force_svg))
|
||||
.or_else(|| {
|
||||
let p = PathBuf::from(&self.name);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue