ShowWName: Increase horizontal padding for flash

Currently the flash window width leaves a very small amount of padding. This
patch adds some extra horizontal width, governed by text width and length.
This commit is contained in:
crodjer
2012-03-05 16:45:17 +00:00
parent d5e7d6217f
commit e2bb57bd63

View File

@@ -90,7 +90,7 @@ flashName c (Rectangle sx sy wh ht) wrs = do
d <- asks display
n <- withWindowSet (return . S.currentTag)
f <- initXMF (swn_font c)
width <- textWidthXMF d f n
width <- fmap (\w -> w + w `div` length n) $ textWidthXMF d f n
(as,ds) <- textExtentsXMF f n
let hight = as + ds
y = fi sy + (fi ht - hight + 2) `div` 2