summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorjao <jao@gnu.org>2015-03-17 00:37:43 +0100
committerjao <jao@gnu.org>2015-03-17 00:37:43 +0100
commit17722c7b63ac878aede2ad80aac1267921d9a8dc (patch)
tree3c66a396eee23debf431c22c40fac897d182bbc9 /src
parent208ecb56790ee6cd372cf340c0b22d7b5fe1d2ad (diff)
downloadxmobar-17722c7b63ac878aede2ad80aac1267921d9a8dc.tar.gz
xmobar-17722c7b63ac878aede2ad80aac1267921d9a8dc.tar.bz2
Trying a better vertical alignmnet (issue #221)
Diffstat (limited to 'src')
-rw-r--r--src/Xmobar.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Xmobar.hs b/src/Xmobar.hs
index 1963ba2..08a6570 100644
--- a/src/Xmobar.hs
+++ b/src/Xmobar.hs
@@ -324,10 +324,10 @@ verticalOffset ht (Text t) fontst conf
(as,ds) <- io $ textExtents fontst t
let bwidth = borderOffset (border conf) (borderWidth conf)
verticalMargin = fi ht - fi (as + ds) - 2 * fi (abs bwidth)
- return $ fi ht - fi ds - (verticalMargin `div` 2) + bwidth + 1
+ return $ fi ht - fi ds - (verticalMargin `div` 2) + bwidth + 2
verticalOffset ht (Icon _) _ conf
| iconOffset conf > -1 = return $ fi (iconOffset conf)
- | otherwise = return $ fi (ht `div` 2)
+ | otherwise = return $ fi (ht `div` 2) - 1
-- | An easy way to print the stuff we need to print
printStrings :: Drawable -> GC -> [XFont] -> Position