From 2b4483a9f1c69d396139ac84efddd148a0060db1 Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Thu, 8 Jun 2017 07:11:28 -0400 Subject: Add the capability to be a bit smarter when determining a "fallback" icon for .desktop entries to be shown on the desktop. This fixes the icons for removeable USB drives on TrueOS, and might fix the icons for other .desktop files as well. --- .../lumina-desktop/desktop-plugins/applauncher/AppLauncherPlugin.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'src-qt5/core/lumina-desktop') diff --git a/src-qt5/core/lumina-desktop/desktop-plugins/applauncher/AppLauncherPlugin.cpp b/src-qt5/core/lumina-desktop/desktop-plugins/applauncher/AppLauncherPlugin.cpp index 61293b46..f751441d 100644 --- a/src-qt5/core/lumina-desktop/desktop-plugins/applauncher/AppLauncherPlugin.cpp +++ b/src-qt5/core/lumina-desktop/desktop-plugins/applauncher/AppLauncherPlugin.cpp @@ -64,6 +64,7 @@ void AppLauncherPlugin::loadButton(){ }else{ button->setWhatsThis(file.filePath); if(ICONS->exists(file.icon)){ iconID = file.icon; } + else if(ICONS->exists(file.icon.section("-",0,-2)) ){ iconID = file.icon.section("-",0,-2); } //some icons get very specific with "-" delimiters, look for a more generic icon if possible else{ iconID = "system-run"; } //button->setIcon( QIcon(LXDG::findIcon(file.icon,"system-run").pixmap(QSize(icosize,icosize)).scaledToHeight(icosize, Qt::SmoothTransformation) ) ); if(!file.comment.isEmpty()){button->setToolTip(file.comment); } -- cgit