aboutsummaryrefslogtreecommitdiff
path: root/lumina-desktop/desktop-plugins
diff options
context:
space:
mode:
Diffstat (limited to 'lumina-desktop/desktop-plugins')
-rw-r--r--lumina-desktop/desktop-plugins/applauncher/AppLauncherPlugin.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/lumina-desktop/desktop-plugins/applauncher/AppLauncherPlugin.cpp b/lumina-desktop/desktop-plugins/applauncher/AppLauncherPlugin.cpp
index 40eca47e..926c6fb6 100644
--- a/lumina-desktop/desktop-plugins/applauncher/AppLauncherPlugin.cpp
+++ b/lumina-desktop/desktop-plugins/applauncher/AppLauncherPlugin.cpp
@@ -71,6 +71,15 @@ void AppLauncherPlugin::loadButton(){
button->setText( tr("Click to Set") );
if(!watcher->files().isEmpty()){ watcher->removePaths(watcher->files()); }
}
+ //If the file is a symlink, put the overlay on the icon
+ if(QFileInfo(path).isSymLink()){
+ QImage img = button->icon().pixmap(QSize(icosize,icosize)).toImage();
+ int oSize = icosize/2; //overlay size
+ QPixmap overlay = LXDG::findIcon("emblem-symbolic-link").pixmap(oSize,oSize).scaled(oSize,oSize, Qt::KeepAspectRatio, Qt::SmoothTransformation);
+ QPainter painter(&img);
+ painter.drawPixmap(icosize-oSize,icosize-oSize,overlay); //put it in the bottom-right corner
+ button->setIcon( QIcon(QPixmap::fromImage(img)) );
+ }
//Now adjust the visible text as necessary based on font/grid sizing
button->setToolTip(txt);
//Double check that the visual icon size matches the requested size - otherwise upscale the icon
bgstack15