summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--src/XUtil.hsc4
-rw-r--r--src/Xmobar.hs2
2 files changed, 2 insertions, 4 deletions
diff --git a/src/XUtil.hsc b/src/XUtil.hsc
index b8f6a73..5d177c5 100644
--- a/src/XUtil.hsc
+++ b/src/XUtil.hsc
@@ -184,9 +184,7 @@ printString dpy drw fs@(Xft fonts) _ fc bc x y s al = do
when (al == 255) $ do
(a,d) <- textExtents fs s
gi <- xftTxtExtents' dpy fonts s
- drawXftRect draw bc'
- (x + 1 - fi (xglyphinfo_x gi)) (y - a)
- (xglyphinfo_xOff gi) (a + d)
+ drawXftRect draw bc' x (y - a + 1) (xglyphinfo_xOff gi) (a + d)
drawXftString' draw fc' fonts (toInteger x) (toInteger y) s
#endif
diff --git a/src/Xmobar.hs b/src/Xmobar.hs
index c3f32cb..12dc1de 100644
--- a/src/Xmobar.hs
+++ b/src/Xmobar.hs
@@ -324,7 +324,7 @@ 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
+ return $ fi ht - fi ds - (verticalMargin `div` 2) + bwidth - 1
verticalOffset ht (Icon _) _ conf
| iconOffset conf > -1 = return $ fi (iconOffset conf)
| otherwise = return $ fi (ht `div` 2) - 1