diff options
| author | Andrea Rossato <andrea.rossato@ing.unitn.it> | 2008-02-19 02:19:09 +0100 | 
|---|---|---|
| committer | Andrea Rossato <andrea.rossato@ing.unitn.it> | 2008-02-19 02:19:09 +0100 | 
| commit | 7fe02668f58262639c4e9caa555ccfad20f68d8c (patch) | |
| tree | 297d60def7e81314bffa0e919182561eafa8709f | |
| parent | 89ed90ed396988e4c37533877e1c7b936fbd4678 (diff) | |
| download | xmobar-7fe02668f58262639c4e9caa555ccfad20f68d8c.tar.gz xmobar-7fe02668f58262639c4e9caa555ccfad20f68d8c.tar.bz2 | |
Xmobar: vertical align after wc string
darcs-hash:20080219011909-d6583-c2c8e53e316808e52d6b70af2cf454a54f65515d.gz
| -rw-r--r-- | Xmobar.hs | 8 | 
1 files changed, 4 insertions, 4 deletions
| @@ -133,8 +133,8 @@ createWin d fs c = do    let dflt = defaultScreen d    r:_   <- getScreenInfo d    rootw <- rootWindow d dflt -  let (_,rl)      = wcTextExtents fs "Tg" -      ht          = rect_height rl + 2 +  let (_,rl)      = wcTextExtents fs "0" +      ht          = rect_height rl + 4        (x,y,w,h,o) = setPosition (position c) r (fi ht)    win <- mkUnmanagedWindow d (defaultScreenOfDisplay d) rootw x y w h o    selectInput       d win (exposureMask .|. structureNotifyMask) @@ -237,10 +237,10 @@ printStrings _ _ _ _ _ [] = return ()  printStrings dr gc fontst offs a sl@((s,c,l):xs) = do    r <- ask    let (conf,d)             = (config &&& display) r -      Rectangle _ _ wid ht = rect r +      Rectangle _ _ wid _  = rect r        (_,rl) = wcTextExtents fontst s        totSLen              = foldr (\(_,_,len) -> (+) len) 0 sl -      valign               = (fi ht + fi (rect_height rl)) `div` 2 +      valign               = fi $ rect_height rl        remWidth             = fi wid - fi totSLen        offset               = case a of                                 C -> (remWidth + offs) `div` 2 | 
