mirror of
https://github.com/xmonad/xmonad-contrib.git
synced 2025-08-04 22:21:54 -07:00
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:
@@ -90,7 +90,7 @@ flashName c (Rectangle sx sy wh ht) wrs = do
|
|||||||
d <- asks display
|
d <- asks display
|
||||||
n <- withWindowSet (return . S.currentTag)
|
n <- withWindowSet (return . S.currentTag)
|
||||||
f <- initXMF (swn_font c)
|
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
|
(as,ds) <- textExtentsXMF f n
|
||||||
let hight = as + ds
|
let hight = as + ds
|
||||||
y = fi sy + (fi ht - hight + 2) `div` 2
|
y = fi sy + (fi ht - hight + 2) `div` 2
|
||||||
|
Reference in New Issue
Block a user