aboutsummaryrefslogtreecommitdiff
path: root/lumina-desktop/panel-plugins/userbutton/UserItemWidget.cpp
diff options
context:
space:
mode:
authorKen Moore <ken@pcbsd.org>2015-05-28 09:56:15 -0400
committerKen Moore <ken@pcbsd.org>2015-05-28 09:56:15 -0400
commitd0fb463abb9e79606c9eb75b3a94331127cd5060 (patch)
tree2ffe3c0cb2e6dee36e56fef82bf49eb5e17d5b47 /lumina-desktop/panel-plugins/userbutton/UserItemWidget.cpp
parentFix up the display of directories in the user button plugin. (diff)
downloadlumina-d0fb463abb9e79606c9eb75b3a94331127cd5060.tar.gz
lumina-d0fb463abb9e79606c9eb75b3a94331127cd5060.tar.bz2
lumina-d0fb463abb9e79606c9eb75b3a94331127cd5060.zip
Add a new LUtils::imageExtensions() function, and setup the lumina-desktop plugins to all use that for checking whether a thumbnail can be shown. Also add thumbnail support into the user button for favorite files.
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