diff options
author | Alexander Polakov <plhk@sdf.org> | 2013-02-04 02:58:55 +0400 |
---|---|---|
committer | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2013-02-04 01:24:43 +0100 |
commit | 30f82a14f8183bade38090b3f3d1fd8463950201 (patch) | |
tree | ce35cef6a284b4c541177a19b74163c5d1a43ce0 /src/Xmobar.hs | |
parent | 3a7859e2147e714471717d4dcb58d9a19c24cb88 (diff) | |
download | xmobar-30f82a14f8183bade38090b3f3d1fd8463950201.tar.gz xmobar-30f82a14f8183bade38090b3f3d1fd8463950201.tar.bz2 |
Use real icon width
Diffstat (limited to 'src/Xmobar.hs')
-rw-r--r-- | src/Xmobar.hs | 3 |
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 |