diff options
author | Ken Moore <ken@ixsystems.com> | 2017-05-04 09:48:42 -0400 |
---|---|---|
committer | Ken Moore <ken@ixsystems.com> | 2017-05-04 09:48:42 -0400 |
commit | 63e9a93215d41882fb4632bac155102635145a4f (patch) | |
tree | a05e25cb699f1175b1f4bc17f1497a6b3b37ff7f | |
parent | Fix a syntax error in the resulting .desktop file (diff) | |
download | lumina-63e9a93215d41882fb4632bac155102635145a4f.tar.gz lumina-63e9a93215d41882fb4632bac155102635145a4f.tar.bz2 lumina-63e9a93215d41882fb4632bac155102635145a4f.zip |
Clean up some margins on the clock for the horizontal orientation.
-rw-r--r-- | src-qt5/core/lumina-desktop/panel-plugins/clock/LClock.cpp | 4 |
1 files changed, 3 insertions, 1 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 c96d0c45..a5266bee 100644 --- a/src-qt5/core/lumina-desktop/panel-plugins/clock/LClock.cpp +++ b/src-qt5/core/lumina-desktop/panel-plugins/clock/LClock.cpp @@ -95,9 +95,11 @@ void LClock::updateTime(bool adjustformat){ int wid = 0; int lwid; for(int i=0; i<lines.length(); i++){ - int lwid = button->fontMetrics().width(lines[i]); + lwid = button->fontMetrics().width(lines[i]); if(lwid>wid){ wid = lwid; } } + 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 ); }else{ //vertical layout |