aboutsummaryrefslogtreecommitdiff
path: root/lumina-desktop/panel-plugins
diff options
context:
space:
mode:
Diffstat (limited to 'lumina-desktop/panel-plugins')
-rw-r--r--lumina-desktop/panel-plugins/desktopbar/LDeskBar.cpp6
-rw-r--r--lumina-desktop/panel-plugins/userbutton/UserItemWidget.cpp9
2 files changed, 13 insertions, 2 deletions
diff --git a/lumina-desktop/panel-plugins/desktopbar/LDeskBar.cpp b/lumina-desktop/panel-plugins/desktopbar/LDeskBar.cpp
index d29d4354..163f7c0a 100644
--- a/lumina-desktop/panel-plugins/desktopbar/LDeskBar.cpp
+++ b/lumina-desktop/panel-plugins/desktopbar/LDeskBar.cpp
@@ -191,7 +191,11 @@ void LDeskBarPlugin::desktopChanged(){
videoM->addAction( newAction(path, name, LXDG::findMimeIcon(type)) );
}else if(type.startsWith("image/")){
//Add it to pictureM
- pictureM->addAction( newAction(path, name, LXDG::findMimeIcon(type)) );
+ if(LUtils::imageExtensions().contains(path.section("/",-1).section(".",-1).toLower()) ){
+ pictureM->addAction( newAction(path, name, QIcon(path)) );
+ }else{
+ pictureM->addAction( newAction(path, name, LXDG::findMimeIcon(type)) );
+ }
}else if(type.startsWith("text/")){
//Add it to docM
docM->addAction( newAction(path, name, LXDG::findMimeIcon(type)) );
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