mirror of
https://github.com/xmonad/xmonad-contrib.git
synced 2025-05-19 11:30:22 -07:00
'XMonad.Util.Rectangle': 'withBorder' fixes
Fix handling of negative borders in 'withBorder'.
This commit is contained in:
parent
cc00a93f1a
commit
31bfcc217f
@ -179,12 +179,12 @@ withBorder t b r l i (Rectangle x y w h) =
|
||||
bh = w' - iw
|
||||
bv = h' - ih
|
||||
-- scaled border ratios
|
||||
rh = if l + r == 0
|
||||
rh = if l + r <= 0
|
||||
then 1
|
||||
else min 1 $ abs $ bh % (l + r)
|
||||
rv = if t + b == 0
|
||||
else min 1 $ bh % (l + r)
|
||||
rv = if t + b <= 0
|
||||
then 1
|
||||
else min 1 $ abs $ bv % (t + b)
|
||||
else min 1 $ bv % (t + b)
|
||||
-- scaled border pixels
|
||||
t' = truncate $ rv * fromIntegral t
|
||||
b' = truncate $ rv * fromIntegral b
|
||||
|
Loading…
x
Reference in New Issue
Block a user