diff options
author | Ken Moore <ken@ixsystems.com> | 2017-05-31 12:28:35 -0400 |
---|---|---|
committer | Ken Moore <ken@ixsystems.com> | 2017-05-31 12:28:35 -0400 |
commit | b28765cf26c4ad0570b7d9cc7d277fbc4ad42222 (patch) | |
tree | ab344eba78f30159cee42ce480b6c07a1630c88d /src-qt5/core/lumina-desktop/panel-plugins/clock/LClock.cpp | |
parent | Merge branch 'master' of github.com:trueos/lumina (diff) | |
download | lumina-b28765cf26c4ad0570b7d9cc7d277fbc4ad42222.tar.gz lumina-b28765cf26c4ad0570b7d9cc7d277fbc4ad42222.tar.bz2 lumina-b28765cf26c4ad0570b7d9cc7d277fbc4ad42222.zip |
Fix up the size limitations on the clock plugin for the panel
Diffstat (limited to 'src-qt5/core/lumina-desktop/panel-plugins/clock/LClock.cpp')
-rw-r--r-- | src-qt5/core/lumina-desktop/panel-plugins/clock/LClock.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
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); |