summaryrefslogtreecommitdiffhomepage
path: root/Xmobar.hs
diff options
context:
space:
mode:
authorDmitry Kurochkin <dmitry.kurochkin@gmail.com>2007-10-23 18:54:30 +0200
committerDmitry Kurochkin <dmitry.kurochkin@gmail.com>2007-10-23 18:54:30 +0200
commit77fc3ca140d0b7cc1314437cb7b45fd897459550 (patch)
tree51038e2df8e58cd8d21f56e6c12f1dc4e1d28bcd /Xmobar.hs
parent51f43202735c51ca93e9552f4f7508aa565e8f4e (diff)
downloadxmobar-77fc3ca140d0b7cc1314437cb7b45fd897459550.tar.gz
xmobar-77fc3ca140d0b7cc1314437cb7b45fd897459550.tar.bz2
Fix text vertical alignment.
darcs-hash:20071023165430-903e8-c4c8b5aaae19225116f84a753cd57f902070dbbd.gz
Diffstat (limited to 'Xmobar.hs')
-rw-r--r--Xmobar.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/Xmobar.hs b/Xmobar.hs
index 5e79009..864aa61 100644
--- a/Xmobar.hs
+++ b/Xmobar.hs
@@ -174,9 +174,9 @@ printStrings _ _ _ _ [] = return ()
printStrings dr gc fontst offs sl@((s,c,l):xs) = do
r <- ask
let (conf,d) = (config &&& display) r
- (_,asc,_,_) = textExtents fontst s
+ (_,asc,dsc,_) = textExtents fontst s
totSLen = foldr (\(_,_,len) -> (+) len) 0 sl
- valign = (fi (height conf) + fi asc) `div` 2
+ valign = (fi (height conf) + fi (asc) - fi dsc) `div` 2
remWidth = fi (width conf) - fi totSLen
offset = case (align conf) of
"center" -> (remWidth + offs) `div` 2