diff options
author | Ken Moore <ken@ixsystems.com> | 2017-02-02 15:48:38 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-02-02 15:48:38 -0500 |
commit | 9493b7db597191aa545fcf36491c7dcf6c724cd7 (patch) | |
tree | b9e2bd59f46fd67ad9f2ea34fb5619347bdf34c0 /src-qt5/core/lumina-desktop/panel-plugins/taskmanager | |
parent | Clean up the window activate XCB function. Now it should send the window a cl... (diff) | |
parent | Add missing call to this->setText(). (diff) | |
download | lumina-9493b7db597191aa545fcf36491c7dcf6c724cd7.tar.gz lumina-9493b7db597191aa545fcf36491c7dcf6c724cd7.tar.bz2 lumina-9493b7db597191aa545fcf36491c7dcf6c724cd7.zip |
Merge pull request #368 from antab/bugfix-taskmanager
Bugfix taskmanager
Diffstat (limited to 'src-qt5/core/lumina-desktop/panel-plugins/taskmanager')
-rw-r--r-- | src-qt5/core/lumina-desktop/panel-plugins/taskmanager/LTaskButton.cpp | 10 | ||||
-rw-r--r-- | src-qt5/core/lumina-desktop/panel-plugins/taskmanager/LTaskManagerPlugin.cpp | 2 |
2 files changed, 6 insertions, 6 deletions
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 0dd68bb0..ab4e786f 100644 --- a/src-qt5/core/lumina-desktop/panel-plugins/taskmanager/LTaskButton.cpp +++ b/src-qt5/core/lumina-desktop/panel-plugins/taskmanager/LTaskButton.cpp @@ -16,7 +16,6 @@ LTaskButton::LTaskButton(QWidget *parent, bool smallDisplay) : LTBWidget(parent) winMenu = new QMenu(this); UpdateMenus(); showText = !smallDisplay; - this->setToolButtonStyle(Qt::ToolButtonTextBesideIcon); this->setAutoRaise(false); //make sure these always look like buttons this->setContextMenuPolicy(Qt::CustomContextMenu); this->setFocusPolicy(Qt::NoFocus); @@ -126,16 +125,15 @@ void LTaskButton::UpdateButton(){ 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->setText(txt); + }else if(noicon){ this->setText( cname ); } + else{ this->setText(""); } this->setToolTip(WINLIST[0].text()); }else if(WINLIST.length() > 1){ //multiple windows this->setPopupMode(QToolButton::InstantPopup); this->setMenu(winMenu); - this->setToolButtonStyle(Qt::ToolButtonTextBesideIcon); - if(noicon || showText){ "("+QString::number(WINLIST.length())+") "+cname; } + if(noicon || showText){ this->setText("("+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 diff --git a/src-qt5/core/lumina-desktop/panel-plugins/taskmanager/LTaskManagerPlugin.cpp b/src-qt5/core/lumina-desktop/panel-plugins/taskmanager/LTaskManagerPlugin.cpp index 79c5dd36..c8e24702 100644 --- a/src-qt5/core/lumina-desktop/panel-plugins/taskmanager/LTaskManagerPlugin.cpp +++ b/src-qt5/core/lumina-desktop/panel-plugins/taskmanager/LTaskManagerPlugin.cpp @@ -116,8 +116,10 @@ void LTaskManagerPlugin::UpdateButtons(){ but->addWindow( winlist[i] ); if(this->layout()->direction()==QBoxLayout::LeftToRight){ but->setIconSize(QSize(this->height(), this->height())); + but->setToolButtonStyle(Qt::ToolButtonTextBesideIcon); }else{ but->setIconSize(QSize(this->width(), this->width())); + but->setToolButtonStyle(Qt::ToolButtonTextUnderIcon); } this->layout()->addWidget(but); connect(but, SIGNAL(MenuClosed()), this, SIGNAL(MenuClosed())); |