summaryrefslogtreecommitdiffhomepage
path: root/src/Xmobar.hs
diff options
context:
space:
mode:
authorAlexander Polakov <plhk@sdf.org>2013-02-03 15:34:28 +0400
committerJose Antonio Ortega Ruiz <jao@gnu.org>2013-02-04 01:59:35 +0100
commit9bd59a251b768f87197f9f1a0618784b485353a7 (patch)
tree1cf36de111c197baa9f2bbca2ca4f8e66772cede /src/Xmobar.hs
parent30f82a14f8183bade38090b3f3d1fd8463950201 (diff)
downloadxmobar-9bd59a251b768f87197f9f1a0618784b485353a7.tar.gz
xmobar-9bd59a251b768f87197f9f1a0618784b485353a7.tar.bz2
Better icon alignment
Diffstat (limited to 'src/Xmobar.hs')
-rw-r--r--src/Xmobar.hs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Xmobar.hs b/src/Xmobar.hs
index 8ad82b2..67badaa 100644
--- a/src/Xmobar.hs
+++ b/src/Xmobar.hs
@@ -271,9 +271,9 @@ printStrings :: Drawable -> GC -> XFont -> Position
printStrings _ _ _ _ _ [] = return ()
printStrings dr gc fontst offs a sl@((s,c,l):xs) = do
r <- ask
- let fromWidget (Text t) = t
- fromWidget (Icon t) = t
- (as,ds) <- io $ textExtents fontst (fromWidget s)
+ (as,ds) <- case s of
+ Text t -> io $ textExtents fontst t
+ Icon _ -> return (0, 0)
let (conf,d) = (config &&& display) r
Rectangle _ _ wid ht = rect r
totSLen = foldr (\(_,_,len) -> (+) len) 0 sl