aboutsummaryrefslogtreecommitdiff
path: root/src-qt5
diff options
context:
space:
mode:
authorKen Moore <moorekou@gmail.com>2016-06-10 21:30:48 -0400
committerKen Moore <moorekou@gmail.com>2016-06-10 21:30:48 -0400
commit46a47814c9e729d3a17d24a946b2f512d7e6d700 (patch)
treea5a3b6ab8f6944df284436188004292fbd2c9d15 /src-qt5
parentChange to using the "start-here-lumina" icon instead, "start-here" was alread... (diff)
downloadlumina-46a47814c9e729d3a17d24a946b2f512d7e6d700.tar.gz
lumina-46a47814c9e729d3a17d24a946b2f512d7e6d700.tar.bz2
lumina-46a47814c9e729d3a17d24a946b2f512d7e6d700.zip
Ensure a more uniform size for task manager buttons.
Diffstat (limited to 'src-qt5')
-rw-r--r--src-qt5/core/lumina-desktop/LWinInfo.cpp4
-rw-r--r--src-qt5/core/lumina-desktop/panel-plugins/taskmanager/LTaskButton.cpp8
2 files changed, 8 insertions, 4 deletions
diff --git a/src-qt5/core/lumina-desktop/LWinInfo.cpp b/src-qt5/core/lumina-desktop/LWinInfo.cpp
index 3ff0c2d7..6a6cea0b 100644
--- a/src-qt5/core/lumina-desktop/LWinInfo.cpp
+++ b/src-qt5/core/lumina-desktop/LWinInfo.cpp
@@ -21,7 +21,7 @@ QString LWinInfo::text(){
if(nm.simplified().isEmpty()){ nm = LSession::handle()->XCB->OldWindowIconName(window); }
if(nm.simplified().isEmpty()){ nm = LSession::handle()->XCB->OldWindowName(window); }
//Make sure that the text is a reasonable size (40 char limit)
- if(nm.length()>40){ nm = nm.left(40)+"..."; }
+ //if(nm.length()>40){ nm = nm.left(40)+"..."; }
return nm;
}
@@ -45,4 +45,4 @@ LXCB::WINDOWVISIBILITY LWinInfo::status(bool update){
cstate = LSession::handle()->XCB->WindowState(window);
}
return cstate;
-} \ No newline at end of file
+}
diff --git a/src-qt5/core/lumina-desktop/panel-plugins/taskmanager/LTaskButton.cpp b/src-qt5/core/lumina-desktop/panel-plugins/taskmanager/LTaskButton.cpp
index a67ef5d6..7e2e53de 100644
--- a/src-qt5/core/lumina-desktop/panel-plugins/taskmanager/LTaskButton.cpp
+++ b/src-qt5/core/lumina-desktop/panel-plugins/taskmanager/LTaskButton.cpp
@@ -122,8 +122,12 @@ void LTaskButton::UpdateButton(){
//single window
this->setPopupMode(QToolButton::DelayedPopup);
this->setMenu(actMenu);
- if(showText){ this->setToolButtonStyle(Qt::ToolButtonTextBesideIcon); this->setText( WINLIST[0].text()); }
- else if(noicon){ this->setToolButtonStyle(Qt::ToolButtonTextBesideIcon); this->setText( cname ); }
+ if(showText){
+ QString txt = WINLIST[0].text();
+ if(txt.length()>30){ txt.truncate(27); txt.append("..."); }
+ else if(txt.length()<30){ txt = txt.leftJustified(30, ' '); }
+ this->setToolButtonStyle(Qt::ToolButtonTextBesideIcon); this->setText(txt);
+ }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){
bgstack15