summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--Xmobar.hs5
1 files changed, 4 insertions, 1 deletions
diff --git a/Xmobar.hs b/Xmobar.hs
index 7128074..1ad18e1 100644
--- a/Xmobar.hs
+++ b/Xmobar.hs
@@ -271,7 +271,7 @@ printStrings dr gc fontst offs a sl@((s,c,l):xs) = do
r <- ask
(as,ds) <- io $ textExtents fontst s
let (conf,d) = (config &&& display) r
- Rectangle _ _ wid _ = rect r
+ Rectangle _ _ wid ht = rect r
totSLen = foldr (\(_,_,len) -> (+) len) 0 sl
valign = fi $ as + ds
remWidth = fi wid - fi totSLen
@@ -282,5 +282,8 @@ printStrings dr gc fontst offs a sl@((s,c,l):xs) = do
(fc,bc) = case (break (==',') c) of
(f,',':b) -> (f, b )
(f, _) -> (f, bgColor conf)
+ withColors d [bc] $ \[bc'] -> do
+ io $ setForeground d gc bc'
+ io $ fillRectangle d dr gc offset 0 (fi l) ht
io $ printString d dr fontst gc fc bc offset valign s
printStrings dr gc fontst (offs + l) a xs