aboutsummaryrefslogtreecommitdiff
path: root/lumina-desktop/panel-plugins/systemstart/ItemWidget.cpp
diff options
context:
space:
mode:
authorKen Moore <moorekou@gmail.com>2015-10-14 09:42:22 -0400
committerKen Moore <moorekou@gmail.com>2015-10-14 09:42:22 -0400
commit4c488bb4c11e46372c6afdf7e9526b390a352889 (patch)
tree6e157e8d892b6f8997faaa9ba65565401ae926d6 /lumina-desktop/panel-plugins/systemstart/ItemWidget.cpp
parentUpdate the FreeBSD device IO calculation: Now it will return the instantaneou... (diff)
downloadlumina-4c488bb4c11e46372c6afdf7e9526b390a352889.tar.gz
lumina-4c488bb4c11e46372c6afdf7e9526b390a352889.tar.bz2
lumina-4c488bb4c11e46372c6afdf7e9526b390a352889.zip
Ensure that the item widgets in the start menu plugin use all the text possible for the size of the menu (including active change on resize).
Diffstat (limited to 'lumina-desktop/panel-plugins/systemstart/ItemWidget.cpp')
-rw-r--r--lumina-desktop/panel-plugins/systemstart/ItemWidget.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/lumina-desktop/panel-plugins/systemstart/ItemWidget.cpp b/lumina-desktop/panel-plugins/systemstart/ItemWidget.cpp
index 6127bfc9..a4fb5b19 100644
--- a/lumina-desktop/panel-plugins/systemstart/ItemWidget.cpp
+++ b/lumina-desktop/panel-plugins/systemstart/ItemWidget.cpp
@@ -9,7 +9,8 @@
#include <QMenu>
#include "../../LSession.h"
-#define TEXTCUTOFF 165
+//#define TEXTCUTOFF 165
+
ItemWidget::ItemWidget(QWidget *parent, QString itemPath, QString type, bool goback) : QFrame(parent){
createWidget();
//Now fill it appropriately
@@ -20,7 +21,7 @@ ItemWidget::ItemWidget(QWidget *parent, QString itemPath, QString type, bool gob
XDGDesktop item = LXDG::loadDesktopFile(itemPath, ok);
if(ok && LXDG::checkValidity(item) ){
icon->setPixmap( LXDG::findIcon(item.icon, "preferences-system-windows-actions").pixmap(32,32) );
- name->setText( this->fontMetrics().elidedText(item.name, Qt::ElideRight, TEXTCUTOFF) );
+ name->setText( item.name); //this->fontMetrics().elidedText(item.name, Qt::ElideRight, TEXTCUTOFF) );
setupActions(item);
}else{
gooditem = false;
@@ -34,7 +35,7 @@ ItemWidget::ItemWidget(QWidget *parent, QString itemPath, QString type, bool gob
name->setText( tr("Go Back") );
}else{
icon->setPixmap( LXDG::findIcon("folder","").pixmap(32,32) );
- name->setText( this->fontMetrics().elidedText(itemPath.section("/",-1), Qt::ElideRight, TEXTCUTOFF) );
+ name->setText( itemPath.section("/",-1)); //this->fontMetrics().elidedText(itemPath.section("/",-1), Qt::ElideRight, TEXTCUTOFF) );
}
}else{
actButton->setVisible(false);
@@ -47,7 +48,7 @@ ItemWidget::ItemWidget(QWidget *parent, QString itemPath, QString type, bool gob
}else{
icon->setPixmap( LXDG::findMimeIcon(itemPath.section("/",-1)).pixmap(32,32) );
}
- name->setText( this->fontMetrics().elidedText(itemPath.section("/",-1), Qt::ElideRight, TEXTCUTOFF) );
+ name->setText( itemPath.section("/",-1) ); //this->fontMetrics().elidedText(itemPath.section("/",-1), Qt::ElideRight, TEXTCUTOFF) );
}
icon->setWhatsThis(itemPath);
if(!goback){ this->setWhatsThis(name->text()); }
@@ -83,7 +84,7 @@ ItemWidget::ItemWidget(QWidget *parent, XDGDesktop item) : QFrame(parent){
}
//Now fill it appropriately
icon->setPixmap( LXDG::findIcon(item.icon,"preferences-system-windows-actions").pixmap(32,32) );
- name->setText( this->fontMetrics().elidedText(item.name, Qt::ElideRight, TEXTCUTOFF) );
+ name->setText( item.name); //this->fontMetrics().elidedText(item.name, Qt::ElideRight, TEXTCUTOFF) );
this->setWhatsThis(name->text());
icon->setWhatsThis(item.filePath);
//Now setup the buttons appropriately
@@ -115,6 +116,7 @@ void ItemWidget::createWidget(){
icon = new QLabel(this);
icon->setFixedSize( QSize(34,34) );
name = new QLabel(this);
+ name->setWordWrap(true);
//Add them to the layout
this->setLayout(new QHBoxLayout());
this->layout()->setContentsMargins(1,1,1,1);
bgstack15