add support for multiple image directorys
This commit is contained in:
1 parent
8fc9efba9a
commit
ff65b45453
1 file changed
+9
-8
+9
-8
@@ -89,16 +89,17 @@ fn view(data: &Data) -> Element<'_, Message> {
|
|||||||
|
|
||||||
fn app_element(app: &rustix_lib::ApplicationEntry) -> Element<'_, Message> {
|
fn app_element(app: &rustix_lib::ApplicationEntry) -> Element<'_, Message> {
|
||||||
//$HOME/.icons (for backwards compatibility), in $XDG_DATA_DIRS/icons and in /usr/share/pixmaps (in that order).
|
//$HOME/.icons (for backwards compatibility), in $XDG_DATA_DIRS/icons and in /usr/share/pixmaps (in that order).
|
||||||
let absolute_icon_path = format!("/usr/share/icons/hicolor/scalable/apps/{}.svg", app.icon.clone());
|
let mut absolute_icon_path = "".to_string();
|
||||||
/*
|
let dirs = [
|
||||||
if std::path::Path::new(&absolute_icon_path).is_file() {} else {
|
format!("/usr/local/share/icons/hicolor/scalable/apps/{}.svg", app.icon.clone()),
|
||||||
absolute_icon_path = format!("$XDG_DATA_DIRS/.icons/{}", app.icon.clone());
|
format!("/usr/share/icons/hicolor/scalable/apps/{}.svg", app.icon.clone()),
|
||||||
if std::path::Path::new(&absolute_icon_path).is_file() {} else {
|
];
|
||||||
absolute_icon_path = format!("/usr/share/pixmaps/{}", app.icon.clone());
|
for dir in dirs {
|
||||||
|
if std::path::Path::new(&dir).is_file() {
|
||||||
|
absolute_icon_path = dir;
|
||||||
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
|
|
||||||
button(
|
button(
|
||||||
column![
|
column![
|
||||||
text(app.name.clone())
|
text(app.name.clone())
|
||||||
|
|||||||
Reference in new issue
Block a user