diff options
author | jao <jao@gnu.org> | 2015-04-13 03:33:54 +0200 |
---|---|---|
committer | jao <jao@gnu.org> | 2015-04-13 03:33:54 +0200 |
commit | 7b891200c17a501ed1641a1300164785f5898a22 (patch) | |
tree | 884094c9ed5f78f9816f552c7382e502373f3906 /src/Xmobar.hs | |
parent | c57003b97a203fbd9b4299522cdf9ff0d61912d3 (diff) | |
download | xmobar-7b891200c17a501ed1641a1300164785f5898a22.tar.gz xmobar-7b891200c17a501ed1641a1300164785f5898a22.tar.bz2 |
A bit more experimentation with alignment
Diffstat (limited to 'src/Xmobar.hs')
-rw-r--r-- | src/Xmobar.hs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Xmobar.hs b/src/Xmobar.hs index 680dd89..723dab2 100644 --- a/src/Xmobar.hs +++ b/src/Xmobar.hs @@ -322,8 +322,8 @@ verticalOffset ht (Text t) fontst conf | textOffset conf > -1 = return $ fi (textOffset conf) | otherwise = do (as,ds) <- io $ textExtents fontst t - let margin = (fi ht - fi (as + ds)) `div` 2 - return $ fi ht - margin - fi ds - 1 + let margin = (fi ht - fi ds - fi as) `div` 2 + return $ fi as + margin - 1 verticalOffset ht (Icon _) _ conf | iconOffset conf > -1 = return $ fi (iconOffset conf) | otherwise = return $ fi (ht `div` 2) - 1 |