From eeaa1d63413af03ea45a9f8919d276bbd64179b8 Mon Sep 17 00:00:00 2001 From: Andrea Rossato Date: Sun, 30 Sep 2007 11:54:41 +0200 Subject: Tabbed: moved string positioning to XUtils darcs-hash:20070930095441-32816-5ef330e813e605abf70b8a365224b48befb9eee2.gz --- Tabbed.hs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'Tabbed.hs') 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) = -- cgit v1.2.3