aboutsummaryrefslogtreecommitdiff
path: root/lumina-desktop/panel-plugins/userbutton/UserItemWidget.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lumina-desktop/panel-plugins/userbutton/UserItemWidget.cpp')
-rw-r--r--lumina-desktop/panel-plugins/userbutton/UserItemWidget.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/lumina-desktop/panel-plugins/userbutton/UserItemWidget.cpp b/lumina-desktop/panel-plugins/userbutton/UserItemWidget.cpp
index 4a274cdf..1cceb5e2 100644
--- a/lumina-desktop/panel-plugins/userbutton/UserItemWidget.cpp
+++ b/lumina-desktop/panel-plugins/userbutton/UserItemWidget.cpp
@@ -33,7 +33,11 @@ UserItemWidget::UserItemWidget(QWidget *parent, QString itemPath, QString type,
}
}else{
if(itemPath.endsWith("/")){ itemPath.chop(1); }
- icon->setPixmap( LXDG::findMimeIcon(type).pixmap(32,32) );
+ if(LUtils::imageExtensions().contains(itemPath.section("/",-1).section(".",-1).toLower()) ){
+ icon->setPixmap( QIcon(itemPath).pixmap(32,32) );
+ }else{
+ icon->setPixmap( LXDG::findMimeIcon(type).pixmap(32,32) );
+ }
name->setText( this->fontMetrics().elidedText(itemPath.section("/",-1), Qt::ElideRight, 180) );
}
icon->setWhatsThis(itemPath);
@@ -123,6 +127,9 @@ void UserItemWidget::setupButton(bool disable){
//This already has a desktop shortcut -- no special actions
button->setVisible(false);
}
+ if(isShortcut){
+ name->setToolTip(icon->whatsThis()); //also allow the user to see the full shortcut path
+ }
}
void UserItemWidget::buttonClicked(){
bgstack15