summaryrefslogtreecommitdiffhomepage
path: root/src/Xmobar.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Xmobar.hs')
-rw-r--r--src/Xmobar.hs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Xmobar.hs b/src/Xmobar.hs
index 04f0770..8ad82b2 100644
--- a/src/Xmobar.hs
+++ b/src/Xmobar.hs
@@ -239,8 +239,9 @@ drawInWin (Rectangle _ _ wid ht) ~[left,center,right] = do
let (c,d ) = (config &&& display) r
(w,fs) = (window &&& fontS ) r
strLn = io . mapM getWidth
+ iconW i = maybe 0 Bitmap.width (lookup i $ iconS r)
getWidth (Text s,cl) = textWidth d fs s >>= \tw -> return (Text s,cl,fi tw)
- getWidth (Icon s,cl) = return (Icon s,cl,fi ht)
+ getWidth (Icon s,cl) = return (Icon s,cl,fi $ iconW s)
withColors d [bgColor c, borderColor c] $ \[bgcolor, bdcolor] -> do
gc <- io $ createGC d w