diff options
author | Ken Moore <ken@ixsystems.com> | 2017-05-31 12:38:36 -0400 |
---|---|---|
committer | Ken Moore <ken@ixsystems.com> | 2017-05-31 12:38:36 -0400 |
commit | c682298b9e36766d09f97c6327ae0d5116a468f1 (patch) | |
tree | 09bf25c44ac0bf49c103fe2375d6a566bad77562 /src-qt5/core/lumina-desktop/panel-plugins | |
parent | Merge branch 'master' of github.com:trueos/lumina (diff) | |
download | lumina-c682298b9e36766d09f97c6327ae0d5116a468f1.tar.gz lumina-c682298b9e36766d09f97c6327ae0d5116a468f1.tar.bz2 lumina-c682298b9e36766d09f97c6327ae0d5116a468f1.zip |
Another quick adjustment to the clock plugin sizing routine - seems to be working fine now.
Diffstat (limited to 'src-qt5/core/lumina-desktop/panel-plugins')
-rw-r--r-- | src-qt5/core/lumina-desktop/panel-plugins/clock/LClock.cpp | 6 |
1 files changed, 3 insertions, 3 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 ef58169d..7c059844 100644 --- a/src-qt5/core/lumina-desktop/panel-plugins/clock/LClock.cpp +++ b/src-qt5/core/lumina-desktop/panel-plugins/clock/LClock.cpp @@ -100,12 +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->setMinimumWidth( wid ); - this->setMaximumWidth(wid+6); + this->setMinimumWidth( wid - (4*button->fontMetrics().width("O")) ); + this->setMaximumWidth(wid + (4*button->fontMetrics().width("O"))); }else{ //vertical layout this->setMinimumHeight(button->fontMetrics().lineSpacing() * lines.length()); - this->setMaximumHeight( 6*button->fontMetrics().height() ); + this->setMaximumHeight( (lines.length()+4)*button->fontMetrics().height() ); } } button->setText(label); |