From dac025f2af09bff6269233ee634cc82e2ba01265 Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Thu, 18 Feb 2016 08:39:42 -0500 Subject: Remove the 80-pixel limit to the text shown on task manager buttons (non-grouped). This allows the buttons to be as large as needed to fit the text, then shrink down automatically when more windows/buttons are opened up. --- lumina-desktop/panel-plugins/taskmanager/LTaskButton.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lumina-desktop/panel-plugins/taskmanager/LTaskButton.cpp') diff --git a/lumina-desktop/panel-plugins/taskmanager/LTaskButton.cpp b/lumina-desktop/panel-plugins/taskmanager/LTaskButton.cpp index 7dba1352..1692b8a5 100644 --- a/lumina-desktop/panel-plugins/taskmanager/LTaskButton.cpp +++ b/lumina-desktop/panel-plugins/taskmanager/LTaskButton.cpp @@ -126,8 +126,8 @@ void LTaskButton::UpdateButton(){ //single window this->setPopupMode(QToolButton::DelayedPopup); this->setMenu(actMenu); - if(showText){ this->setToolButtonStyle(Qt::ToolButtonTextBesideIcon); this->setText( this->fontMetrics().elidedText(WINLIST[0].text(), Qt::ElideRight,80) ); } - else if(noicon){ this->setToolButtonStyle(Qt::ToolButtonTextBesideIcon); this->setText( this->fontMetrics().elidedText(cname, Qt::ElideRight ,80) ); } + if(showText){ this->setToolButtonStyle(Qt::ToolButtonTextBesideIcon); this->setText( WINLIST[0].text()); } + else if(noicon){ this->setToolButtonStyle(Qt::ToolButtonTextBesideIcon); this->setText( cname ); } else{ this->setToolButtonStyle(Qt::ToolButtonIconOnly); this->setText(""); } this->setToolTip(WINLIST[0].text()); }else if(WINLIST.length() > 1){ @@ -135,7 +135,7 @@ void LTaskButton::UpdateButton(){ this->setPopupMode(QToolButton::InstantPopup); this->setMenu(winMenu); this->setToolButtonStyle(Qt::ToolButtonTextBesideIcon); - if(noicon || showText){ this->setText( this->fontMetrics().elidedText(cname, Qt::ElideRight ,80) +" ("+QString::number(WINLIST.length())+")" ); } + if(noicon || showText){ "("+QString::number(WINLIST.length())+") "+cname; } else{ this->setText("("+QString::number(WINLIST.length())+")"); } } this->setState(showstate); //Make sure this is after the button setup so that it properly sets the margins/etc -- cgit