aboutsummaryrefslogtreecommitdiff
path: root/src-qt5/core/libLumina
diff options
context:
space:
mode:
authorKen Moore <ken@ixsystems.com>2017-04-12 09:04:47 -0400
committerKen Moore <ken@ixsystems.com>2017-04-12 09:04:47 -0400
commit6662b1ab518751d4f1f9f3b0295189f8e7c1d371 (patch)
tree2f82cb67a68550ea961187a3a477c1bcea0713c4 /src-qt5/core/libLumina
parentSome rearranging of the icons. The folder-* icons need to be in the places di... (diff)
downloadlumina-6662b1ab518751d4f1f9f3b0295189f8e7c1d371.tar.gz
lumina-6662b1ab518751d4f1f9f3b0295189f8e7c1d371.tar.bz2
lumina-6662b1ab518751d4f1f9f3b0295189f8e7c1d371.zip
Add an additional icon search fallback for mimetype icons (use the *-x-generic icon)
Diffstat (limited to 'src-qt5/core/libLumina')
-rw-r--r--src-qt5/core/libLumina/LuminaXDG.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src-qt5/core/libLumina/LuminaXDG.cpp b/src-qt5/core/libLumina/LuminaXDG.cpp
index f34bc0e8..d17cc330 100644
--- a/src-qt5/core/libLumina/LuminaXDG.cpp
+++ b/src-qt5/core/libLumina/LuminaXDG.cpp
@@ -843,8 +843,12 @@ QIcon LXDG::findIcon(QString iconName, QString fallback){
}
}
//Use the fallback icon if necessary
- if(ico.isNull() && !fallback.isEmpty()){
- ico = LXDG::findIcon(fallback,"");
+ if(ico.isNull() ){
+ if(!fallback.isEmpty()){ ico = LXDG::findIcon(fallback,""); }
+ else if(iconName.contains("-x-") && !iconName.endsWith("-x-generic")){
+ //mimetype - try to use the generic type icon
+ ico = LXDG::findIcon(iconName.section("-x-",0,0)+"-x-generic", "");
+ }
}
if(ico.isNull()){
qDebug() << "Could not find icon:" << iconName << fallback;
bgstack15