summaryrefslogtreecommitdiffhomepage
path: root/src/Xmobar.hs
diff options
context:
space:
mode:
authorJose Antonio Ortega Ruiz <jao@gnu.org>2010-12-27 02:59:07 +0100
committerJose Antonio Ortega Ruiz <jao@gnu.org>2010-12-27 02:59:07 +0100
commit52a3bf1f5f6d10f455a285e4a257ddb2183dbb18 (patch)
tree42187abc2358bbfd774c0ef45614228482e8ec97 /src/Xmobar.hs
parent50f3707ce997132880c8511cf3a9d2f707c22708 (diff)
downloadxmobar-52a3bf1f5f6d10f455a285e4a257ddb2183dbb18.tar.gz
xmobar-52a3bf1f5f6d10f455a285e4a257ddb2183dbb18.tar.bz2
Bug fix: correctly center text vertically
Diffstat (limited to 'src/Xmobar.hs')
-rw-r--r--src/Xmobar.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Xmobar.hs b/src/Xmobar.hs
index b58b060..e4069dd 100644
--- a/src/Xmobar.hs
+++ b/src/Xmobar.hs
@@ -290,7 +290,7 @@ printStrings dr gc fontst offs a sl@((s,c,l):xs) = do
let (conf,d) = (config &&& display) r
Rectangle _ _ wid ht = rect r
totSLen = foldr (\(_,_,len) -> (+) len) 0 sl
- valign = fi $ as + ds
+ valign = (fi ht + fi (as + ds)) `div` 2 - 1
remWidth = fi wid - fi totSLen
offset = case a of
C -> (remWidth + offs) `div` 2