summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJose Antonio Ortega Ruiz <jao@gnu.org>2011-11-16 18:11:37 +0100
committerJose Antonio Ortega Ruiz <jao@gnu.org>2011-11-16 18:11:37 +0100
commit9232bea653070ae48be1a94924f43d55eb32cc8c (patch)
tree6a8dc7a954965dcd334057ff3cbee2b7f4392e92
parent863987f2f9650917204ec6e05a351d59c0644956 (diff)
downloadxmobar-9232bea653070ae48be1a94924f43d55eb32cc8c.tar.gz
xmobar-9232bea653070ae48be1a94924f43d55eb32cc8c.tar.bz2
Partial attempt at better vertical alignment
-rw-r--r--src/Xmobar.hs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Xmobar.hs b/src/Xmobar.hs
index fe46906..a2f6062 100644
--- a/src/Xmobar.hs
+++ b/src/Xmobar.hs
@@ -365,7 +365,8 @@ 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 ht + fi (as + ds)) `div` 2 - 1
+ fntsize = fi (as + ds)
+ valign = fi ht - 1 - (fi ht - fntsize) `div` 2
remWidth = fi wid - fi totSLen
offset = case a of
C -> (remWidth + offs) `div` 2