aboutsummaryrefslogtreecommitdiff
path: root/lumina-desktop/panel-plugins
diff options
context:
space:
mode:
authorKen Moore <ken@pcbsd.org>2015-03-19 10:58:26 -0400
committerKen Moore <ken@pcbsd.org>2015-03-19 10:58:26 -0400
commit7981690582d551e015847d0d31e6f916c9ffbe4c (patch)
treeb9dfe8185b68085e1f7dc1dcc0ab40c915a93a78 /lumina-desktop/panel-plugins
parentOops, forgot to add the new applauncher plugin files to GIT. (diff)
downloadlumina-7981690582d551e015847d0d31e6f916c9ffbe4c.tar.gz
lumina-7981690582d551e015847d0d31e6f916c9ffbe4c.tar.bz2
lumina-7981690582d551e015847d0d31e6f916c9ffbe4c.zip
Update some panel plugins so that they minimize empty space when only an icon is visible.
Diffstat (limited to 'lumina-desktop/panel-plugins')
-rw-r--r--lumina-desktop/panel-plugins/applauncher/AppLaunchButton.cpp2
-rw-r--r--lumina-desktop/panel-plugins/taskmanager/LTaskButton.cpp7
2 files changed, 5 insertions, 4 deletions
diff --git a/lumina-desktop/panel-plugins/applauncher/AppLaunchButton.cpp b/lumina-desktop/panel-plugins/applauncher/AppLaunchButton.cpp
index e4447ce0..5bd7fa96 100644
--- a/lumina-desktop/panel-plugins/applauncher/AppLaunchButton.cpp
+++ b/lumina-desktop/panel-plugins/applauncher/AppLaunchButton.cpp
@@ -12,7 +12,7 @@
AppLaunchButtonPlugin::AppLaunchButtonPlugin(QWidget *parent, QString id, bool horizontal) : LPPlugin(parent, id, horizontal){
button = new QToolButton(this);
button->setAutoRaise(true);
- button->setToolButtonStyle(Qt::ToolButtonTextBesideIcon);
+ button->setToolButtonStyle(Qt::ToolButtonIconOnly);
appfile = id.section("---",0,0).section("::",1,1);
if(!QFile::exists(appfile)){ appfile.clear(); }
connect(button, SIGNAL(clicked()), this, SLOT(AppClicked()));
diff --git a/lumina-desktop/panel-plugins/taskmanager/LTaskButton.cpp b/lumina-desktop/panel-plugins/taskmanager/LTaskButton.cpp
index 7c24dc3d..20607c60 100644
--- a/lumina-desktop/panel-plugins/taskmanager/LTaskButton.cpp
+++ b/lumina-desktop/panel-plugins/taskmanager/LTaskButton.cpp
@@ -121,13 +121,14 @@ void LTaskButton::UpdateButton(){
//single window
this->setPopupMode(QToolButton::DelayedPopup);
this->setMenu(actMenu);
- if(showText){ this->setText( this->fontMetrics().elidedText(WINLIST[0].text(), Qt::ElideRight,80) ); }
- else if(noicon){ this->setText( this->fontMetrics().elidedText(cname, Qt::ElideRight ,80) ); }
- else{ this->setText(""); }
+ 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) ); }
+ else{ this->setToolButtonStyle(Qt::ToolButtonIconOnly); this->setText(""); }
}else if(WINLIST.length() > 1){
//multiple windows
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())+")" ); }
else{ this->setText("("+QString::number(WINLIST.length())+")"); }
}
bgstack15