diff options
author | Ken Moore <ken@ixsystems.com> | 2017-02-28 16:12:42 -0500 |
---|---|---|
committer | Ken Moore <ken@ixsystems.com> | 2017-02-28 16:12:42 -0500 |
commit | a2f40d986bdb6a235f8619a7e3578ada1ca270ac (patch) | |
tree | 5128e2dd1508798e6eb179f841da65776d22196e /src-qt5/core/lumina-desktop/desktop-plugins/applauncher/AppLauncherPlugin.cpp | |
parent | Track down and fix a really weird Fluxbox bug: (diff) | |
parent | Translated using Weblate (lumina_CONFIG@lt (generated)) (diff) | |
download | lumina-a2f40d986bdb6a235f8619a7e3578ada1ca270ac.tar.gz lumina-a2f40d986bdb6a235f8619a7e3578ada1ca270ac.tar.bz2 lumina-a2f40d986bdb6a235f8619a7e3578ada1ca270ac.zip |
Merge branch 'master' of github.com:trueos/lumina
Diffstat (limited to 'src-qt5/core/lumina-desktop/desktop-plugins/applauncher/AppLauncherPlugin.cpp')
-rw-r--r-- | src-qt5/core/lumina-desktop/desktop-plugins/applauncher/AppLauncherPlugin.cpp | 4 |
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..14599c5d 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->setToolTip(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 |