diff options
author | Dmitry Kurochkin <dmitry.kurochkin@gmail.com> | 2007-10-23 18:54:30 +0200 |
---|---|---|
committer | Dmitry Kurochkin <dmitry.kurochkin@gmail.com> | 2007-10-23 18:54:30 +0200 |
commit | 77fc3ca140d0b7cc1314437cb7b45fd897459550 (patch) | |
tree | 51038e2df8e58cd8d21f56e6c12f1dc4e1d28bcd /Xmobar.hs | |
parent | 51f43202735c51ca93e9552f4f7508aa565e8f4e (diff) | |
download | xmobar-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.hs | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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 |