summaryrefslogtreecommitdiffhomepage
path: root/src/Xmobar.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Xmobar.hs')
-rw-r--r--src/Xmobar.hs6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/Xmobar.hs b/src/Xmobar.hs
index de0de0a..3d17fad 100644
--- a/src/Xmobar.hs
+++ b/src/Xmobar.hs
@@ -49,6 +49,7 @@ import Runnable
import Signal
import Window
import XUtil
+import ColorCache
#ifdef DBUS
import IPC.DBus
@@ -262,7 +263,7 @@ printStrings dr gc fontst offs a sl@((s,c,l):xs) = do
let (conf,d) = (config &&& display) r
Rectangle _ _ wid ht = rect r
totSLen = foldr (\(_,_,len) -> (+) len) 0 sl
- valign = ((fi ht + fi (as + ds)) `div` 2) - 1
+ valign = -1 + (fi ht + fi (as + ds)) `div` 2
remWidth = fi wid - fi totSLen
offset = case a of
C -> (remWidth + offs) `div` 2
@@ -271,8 +272,5 @@ 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