diff options
author | jao <jao@gnu.org> | 2015-03-17 00:37:43 +0100 |
---|---|---|
committer | jao <jao@gnu.org> | 2015-03-17 00:37:43 +0100 |
commit | 17722c7b63ac878aede2ad80aac1267921d9a8dc (patch) | |
tree | 3c66a396eee23debf431c22c40fac897d182bbc9 | |
parent | 208ecb56790ee6cd372cf340c0b22d7b5fe1d2ad (diff) | |
download | xmobar-17722c7b63ac878aede2ad80aac1267921d9a8dc.tar.gz xmobar-17722c7b63ac878aede2ad80aac1267921d9a8dc.tar.bz2 |
Trying a better vertical alignmnet (issue #221)
-rw-r--r-- | news.md | 10 | ||||
-rw-r--r-- | src/Xmobar.hs | 4 |
2 files changed, 12 insertions, 2 deletions
@@ -1,5 +1,15 @@ % xmobar - Release notes +## Version 0.23.1 + +_Bug fixes_ + + - Vertical alignment for icons, [issue #216] + - Better error handling in `Volume` monitor, [issue #215] + +[issue #216]: https://github.com/jaor/xmobar/issues/216 +[issue #215]: https://github.com/jaor/xmobar/issues/215 + ## Version 0.23 (Mar 8, 2015) _New features_ 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 |