diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/XUtil.hsc | 7 | ||||
| -rw-r--r-- | src/Xmobar.hs | 6 | 
2 files changed, 7 insertions, 6 deletions
| diff --git a/src/XUtil.hsc b/src/XUtil.hsc index 54eb843..b8f6a73 100644 --- a/src/XUtil.hsc +++ b/src/XUtil.hsc @@ -184,9 +184,10 @@ 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 + d) + 1) (xglyphinfo_xOff gi) (a + d) -    (drawXftString' draw fc' fonts (toInteger x) (toInteger (y - 2)) s) +      drawXftRect draw bc' +                  (x + 1 - fi (xglyphinfo_x gi)) (y - a) +                  (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 08a6570..c3f32cb 100644 --- a/src/Xmobar.hs +++ b/src/Xmobar.hs @@ -316,15 +316,15 @@ drawInWin wr@(Rectangle _ _ wid ht) ~[left,center,right] = do      -- resync      io $ sync d True -verticalOffset ::  (Integral b, Integral a, MonadIO m) => -                   a -> Widget -> XFont -> Config -> m b +verticalOffset :: (Integral b, Integral a, MonadIO m) => +                  a -> Widget -> XFont -> Config -> m b  verticalOffset ht (Text t) fontst conf    | textOffset conf > -1 = return $ fi (textOffset conf)    | otherwise = do       (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 + 2 +     return $ fi ht - fi ds - (verticalMargin `div` 2) + bwidth  verticalOffset ht (Icon _) _ conf    | iconOffset conf > -1 = return $ fi (iconOffset conf)    | otherwise = return $ fi (ht `div` 2) - 1 | 
