aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKen Moore <ken@ixsystems.com>2017-05-31 12:28:35 -0400
committerKen Moore <ken@ixsystems.com>2017-05-31 12:28:35 -0400
commitb28765cf26c4ad0570b7d9cc7d277fbc4ad42222 (patch)
treeab344eba78f30159cee42ce480b6c07a1630c88d
parentMerge branch 'master' of github.com:trueos/lumina (diff)
downloadlumina-b28765cf26c4ad0570b7d9cc7d277fbc4ad42222.tar.gz
lumina-b28765cf26c4ad0570b7d9cc7d277fbc4ad42222.tar.bz2
lumina-b28765cf26c4ad0570b7d9cc7d277fbc4ad42222.zip
Fix up the size limitations on the clock plugin for the panel
-rw-r--r--src-qt5/core/lumina-desktop/LPanel.h1
-rw-r--r--src-qt5/core/lumina-desktop/panel-plugins/clock/LClock.cpp6
2 files changed, 5 insertions, 2 deletions
diff --git a/src-qt5/core/lumina-desktop/LPanel.h b/src-qt5/core/lumina-desktop/LPanel.h
index bcea8eaf..58e315b8 100644
--- a/src-qt5/core/lumina-desktop/LPanel.h
+++ b/src-qt5/core/lumina-desktop/LPanel.h
@@ -42,6 +42,7 @@ private:
int panelnum;
int viswidth, fullwidth;
QList<LPPlugin*> PLUGINS;
+ QRect desiredGeom;
int Screen(); //Turn the screenID into the appropriate number
diff --git a/src-qt5/core/lumina-desktop/panel-plugins/clock/LClock.cpp b/src-qt5/core/lumina-desktop/panel-plugins/clock/LClock.cpp
index a5266bee..ef58169d 100644
--- a/src-qt5/core/lumina-desktop/panel-plugins/clock/LClock.cpp
+++ b/src-qt5/core/lumina-desktop/panel-plugins/clock/LClock.cpp
@@ -100,10 +100,12 @@ void LClock::updateTime(bool adjustformat){
}
if(lines.length()==1){ wid+=6; } //need some extra margins for single-line
else{ wid-=6; } // need to remove some margins for multi-line
- this->setFixedWidth( wid );
+ this->setMinimumWidth( wid );
+ this->setMaximumWidth(wid+6);
}else{
//vertical layout
- this->setMaximumWidth(button->fontMetrics().lineSpacing() * lines.length());
+ this->setMinimumHeight(button->fontMetrics().lineSpacing() * lines.length());
+ this->setMaximumHeight( 6*button->fontMetrics().height() );
}
}
button->setText(label);
bgstack15