aboutsummaryrefslogtreecommitdiffstats
path: root/Tabbed.hs
diff options
context:
space:
mode:
authorAndrea Rossato <andrea.rossato@unibz.it>2007-09-30 11:54:41 +0200
committerAndrea Rossato <andrea.rossato@unibz.it>2007-09-30 11:54:41 +0200
commiteeaa1d63413af03ea45a9f8919d276bbd64179b8 (patch)
tree36e9b8f80827c9964c2f7c876142a81650ed54f0 /Tabbed.hs
parent6bc2ff77ebcd4d5b70811aa44c8f7e607001a090 (diff)
downloadXMonadContrib-eeaa1d63413af03ea45a9f8919d276bbd64179b8.tar.gz
XMonadContrib-eeaa1d63413af03ea45a9f8919d276bbd64179b8.tar.xz
XMonadContrib-eeaa1d63413af03ea45a9f8919d276bbd64179b8.zip
Tabbed: moved string positioning to XUtils
darcs-hash:20070930095441-32816-5ef330e813e605abf70b8a365224b48befb9eee2.gz
Diffstat (limited to 'Tabbed.hs')
-rw-r--r--Tabbed.hs6
1 files changed, 1 insertions, 5 deletions
diff --git a/Tabbed.hs b/Tabbed.hs
index 67f5ae8..0919af0 100644
--- a/Tabbed.hs
+++ b/Tabbed.hs
@@ -189,11 +189,7 @@ updateTab c fs wh (tabw,ow) = do
(activeColor c, activeBorderColor c, activeTextColor c)
let name = shrinkWhile shrinkText (\n -> textWidth fs n >
fromIntegral wh - fromIntegral (ht `div` 2)) (show nw)
- width = textWidth fs name
- (_,asc,desc,_) = textExtents fs name
- y = fromIntegral $ ((ht - fromIntegral (asc + desc)) `div` 2) + fromIntegral asc
- x = fromIntegral (wh `div` 2) - fromIntegral (width `div` 2)
- paintAndWrite tabw fs wh ht 1 bc' borderc' x y tc' bc' name
+ paintAndWrite tabw fs wh ht 1 bc' borderc' tc' bc' AlignCenter name
shrink :: TConf -> Rectangle -> Rectangle
shrink c (Rectangle x y w h) =