aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKen Moore <ken@pcbsd.org>2015-05-11 12:33:15 -0400
committerKen Moore <ken@pcbsd.org>2015-05-11 12:33:15 -0400
commit898ce50c09d501500721f3b2cd74e502bf5fbc95 (patch)
treec134d2e5b68a1a82923a965e253cac0f42569fd6
parentMerge pull request #118 from pcbsd/linux (diff)
downloadlumina-898ce50c09d501500721f3b2cd74e502bf5fbc95.tar.gz
lumina-898ce50c09d501500721f3b2cd74e502bf5fbc95.tar.bz2
lumina-898ce50c09d501500721f3b2cd74e502bf5fbc95.zip
Put in a quick check/safeguard for invalid panel sizing.
-rw-r--r--lumina-desktop/LPanel.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/lumina-desktop/LPanel.cpp b/lumina-desktop/LPanel.cpp
index 3755e9a6..7531d53e 100644
--- a/lumina-desktop/LPanel.cpp
+++ b/lumina-desktop/LPanel.cpp
@@ -109,6 +109,7 @@ void LPanel::UpdatePanel(){
layout->setDirection(QBoxLayout::TopToBottom);
}
int ht = settings->value(PPREFIX+"height", 30).toInt(); //this is technically the distance into the screen from the edge
+ if(ht<=1){ ht = 30; } //some kind of error in the saved height - use the default value
int hidesize = qRound(ht*0.01); //use 1% of the panel size
if(hidesize<2){ hidesize=2; } //minimum of 2 pixels (need space for the mouse to go over it)
if(hidden){ viswidth = hidesize; }
bgstack15