aboutsummaryrefslogtreecommitdiff
path: root/src-qt5
diff options
context:
space:
mode:
authorWeblate <noreply@weblate.org>2017-02-24 18:12:02 +0000
committerWeblate <noreply@weblate.org>2017-02-24 18:12:02 +0000
commit42308ad06163f48b2fdb551958a8a860d6e21d92 (patch)
tree91687fca4258e94660285fe1d0bca4cf2101d3ae /src-qt5
parentTranslated using Weblate (lumina_CONFIG@da (generated)) (diff)
parentMake sure the tooltip on the desktop icons is properly set for .desktop entri... (diff)
downloadlumina-42308ad06163f48b2fdb551958a8a860d6e21d92.tar.gz
lumina-42308ad06163f48b2fdb551958a8a860d6e21d92.tar.bz2
lumina-42308ad06163f48b2fdb551958a8a860d6e21d92.zip
Merge remote-tracking branch 'origin/master'
Diffstat (limited to 'src-qt5')
-rw-r--r--src-qt5/core/lumina-desktop/desktop-plugins/applauncher/AppLauncherPlugin.cpp4
1 files changed, 3 insertions, 1 deletions
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 c8ecf2c8..1d957817 100644
--- a/src-qt5/core/lumina-desktop/desktop-plugins/applauncher/AppLauncherPlugin.cpp
+++ b/src-qt5/core/lumina-desktop/desktop-plugins/applauncher/AppLauncherPlugin.cpp
@@ -38,6 +38,7 @@ void AppLauncherPlugin::loadButton(){
int icosize = this->height()-4 - 2.2*button->fontMetrics().height();
button->setFixedSize( this->width()-4, this->height()-4);
button->setIconSize( QSize(icosize,icosize) );
+ button->setToolTip("");
QString txt;
if(path.endsWith(".desktop") && ok){
XDGDesktop file(path);
@@ -50,6 +51,7 @@ void AppLauncherPlugin::loadButton(){
}else{
button->setWhatsThis(file.filePath);
button->setIcon( QIcon(LXDG::findIcon(file.icon,"system-run").pixmap(QSize(icosize,icosize)).scaledToHeight(icosize, Qt::SmoothTransformation) ) );
+ if(!file.comment.isEmpty()){button->setWhatsThis(file.comment); }
txt = file.name;
if(!watcher->files().isEmpty()){ watcher->removePaths(watcher->files()); }
watcher->addPath(file.filePath); //make sure to update this shortcut if the file changes
@@ -90,7 +92,7 @@ void AppLauncherPlugin::loadButton(){
button->setIcon( QIcon(QPixmap::fromImage(img)) );
}
//Now adjust the visible text as necessary based on font/grid sizing
- button->setToolTip(txt);
+ if(button->tooltip().isEmpty()){ button->setToolTip(txt); }
//Double check that the visual icon size matches the requested size - otherwise upscale the icon
if(button->fontMetrics().width(txt) > (button->width()-OUTMARGIN) ){
//Text too long, try to show it on two lines
bgstack15