diff options
author | jao <jao@gnu.org> | 2022-09-13 06:17:17 +0100 |
---|---|---|
committer | jao <jao@gnu.org> | 2022-09-13 06:17:17 +0100 |
commit | d64969c3fa6dba85430ba38ae48513ec2424004f (patch) | |
tree | ce20165681c9c455b95753eecec2edced7d96a9d /src/Xmobar | |
parent | a17bb0b61dd917b71b1f00340e2ecdafe1991bd8 (diff) | |
download | xmobar-d64969c3fa6dba85430ba38ae48513ec2424004f.tar.gz xmobar-d64969c3fa6dba85430ba38ae48513ec2424004f.tar.bz2 |
cairo: honouring iconOffset
Diffstat (limited to 'src/Xmobar')
-rw-r--r-- | src/Xmobar/X11/CairoDraw.hs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Xmobar/X11/CairoDraw.hs b/src/Xmobar/X11/CairoDraw.hs index c258509..fa11bf4 100644 --- a/src/Xmobar/X11/CairoDraw.hs +++ b/src/Xmobar/X11/CairoDraw.hs @@ -97,11 +97,11 @@ withRenderinfo ctx dctx seg@(Text _, inf, idx, a) = do withRenderinfo _ _ seg@(Hspace w, _, _, _) = do return (seg, \_ _ -> return (), fromIntegral w) -withRenderinfo _ dctx seg@(Icon p, _, idx, _) = do +withRenderinfo _ dctx seg@(Icon p, _, _, _) = do let bm = dcBitmapLookup dctx p wd = maybe 0 (fromIntegral . B.width) bm - ioff = indexedOffset (dcConfig dctx) idx - vpos = dcHeight dctx / 2 - fromIntegral ioff + ioff = iconOffset (dcConfig dctx) + vpos = dcHeight dctx / 2 + fromIntegral ioff draw _ off = dcBitmapDrawer dctx off vpos p return (seg, draw, wd) |