aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lumina-desktop/LPanel.cpp1
-rw-r--r--lumina-desktop/LWinInfo.cpp2
-rw-r--r--lumina-desktop/panel-plugins/clock/LClock.cpp6
-rw-r--r--lumina-desktop/panel-plugins/taskmanager/LTaskButton.cpp6
4 files changed, 9 insertions, 6 deletions
diff --git a/lumina-desktop/LPanel.cpp b/lumina-desktop/LPanel.cpp
index 2940482c..8486bf1c 100644
--- a/lumina-desktop/LPanel.cpp
+++ b/lumina-desktop/LPanel.cpp
@@ -71,6 +71,7 @@ void LPanel::prepareToClose(){
LSession::processEvents();
i--; //need to back up one space to not miss another plugin
}
+ this->hide();
}
void LPanel::scalePanel(double xscale, double yscale){
diff --git a/lumina-desktop/LWinInfo.cpp b/lumina-desktop/LWinInfo.cpp
index 93f589a4..3ff0c2d7 100644
--- a/lumina-desktop/LWinInfo.cpp
+++ b/lumina-desktop/LWinInfo.cpp
@@ -20,6 +20,8 @@ QString LWinInfo::text(){
if(nm.simplified().isEmpty()){ nm = LSession::handle()->XCB->WindowName(window); }
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)+"..."; }
return nm;
}
diff --git a/lumina-desktop/panel-plugins/clock/LClock.cpp b/lumina-desktop/panel-plugins/clock/LClock.cpp
index 9f392831..0ecef3b2 100644
--- a/lumina-desktop/panel-plugins/clock/LClock.cpp
+++ b/lumina-desktop/panel-plugins/clock/LClock.cpp
@@ -16,6 +16,8 @@ LClock::LClock(QWidget *parent, QString id, bool horizontal) : LPPlugin(parent,
button->setStyleSheet("font-weight: bold;");
button->setPopupMode(QToolButton::DelayedPopup); //make sure it runs the update routine first
button->setMenu(new QMenu());
+ //button->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Preferred);
+ //this->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Preferred);
connect(button, SIGNAL(clicked()), this, SLOT(openMenu()));
connect(button->menu(), SIGNAL(aboutToHide()), this, SIGNAL(MenuClosed()));
calendar = new QCalendarWidget(this);
@@ -101,7 +103,6 @@ void LClock::updateFormats(){
datefmt = LSession::handle()->sessionSettings()->value("DateFormat","").toString();
deftime = timefmt.simplified().isEmpty();
defdate = datefmt.simplified().isEmpty();
- this->setMinimumSize(button->fontMetrics().width(timefmt+"MMM")+10, 5);
//Adjust the timer interval based on the smallest unit displayed
if(deftime){ timer->setInterval(500); } //1/2 second
else if(timefmt.contains("z")){ timer->setInterval(1); } //every millisecond (smallest unit)
@@ -109,7 +110,10 @@ void LClock::updateFormats(){
else if(timefmt.contains("m")){ timer->setInterval(2000); } //2 seconds
else{ timer->setInterval(1000); } //unknown format - use 1 second interval
datetimeorder = LSession::handle()->sessionSettings()->value("DateTimeOrder", "timeonly").toString().toLower();
+ //this->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred);
updateTime(true);
+ //Now fix the size of the widget with the new size hint
+ this->setFixedWidth( this->sizeHint().width() +6);
}
void LClock::updateMenu(){
diff --git a/lumina-desktop/panel-plugins/taskmanager/LTaskButton.cpp b/lumina-desktop/panel-plugins/taskmanager/LTaskButton.cpp
index 1692b8a5..a67ef5d6 100644
--- a/lumina-desktop/panel-plugins/taskmanager/LTaskButton.cpp
+++ b/lumina-desktop/panel-plugins/taskmanager/LTaskButton.cpp
@@ -20,6 +20,7 @@ LTaskButton::LTaskButton(QWidget *parent, bool smallDisplay) : LTBWidget(parent)
this->setAutoRaise(false); //make sure these always look like buttons
this->setContextMenuPolicy(Qt::CustomContextMenu);
this->setFocusPolicy(Qt::NoFocus);
+ this->setSizePolicy(QSizePolicy::Maximum, QSizePolicy::Maximum);
winMenu->setContextMenuPolicy(Qt::CustomContextMenu);
connect(this, SIGNAL(customContextMenuRequested(const QPoint&)), this, SLOT(openActionMenu()) );
connect(this, SIGNAL(clicked()), this, SLOT(buttonClicked()) );
@@ -111,11 +112,6 @@ void LTaskButton::UpdateButton(){
LXCB::WINDOWVISIBILITY stat = WINLIST[i].status(true); //update the saved state for the window
if(stat<LXCB::ACTIVE && WINLIST[i].windowID() == LSession::handle()->activeWindow()){ stat = LXCB::ACTIVE; }
if(stat > showstate){ showstate = stat; } //higher priority
-
- /*if(stat==LXCB::ATTENTION){ showstate = stat; } //highest priority
- else if( stat==LXCB::ACTIVE && showstate != LXCB::ATTENTION){ showstate = stat; } //next priority
- else if( stat==LXCB::VISIBLE && showstate != LXCB::ATTENTION && showstate != LXCB::ACTIVE){ showstate = stat; }
- else if(showstate == LXCB::INVISIBLE || showstate == LXCB::IGNORE){ showstate = stat; } //anything is the same/better*/
}
//Now setup the button appropriately
// - visibility
bgstack15