mirror of
https://github.com/xmonad/xmonad.git
synced 2025-08-10 00:51:53 -07:00
make splitHorizontallyBy accept any RealFrac.
This commit is contained in:
@@ -431,7 +431,7 @@ splitVertically n (Rectangle sx sy sw sh) = Rectangle sx sy sw smallh :
|
|||||||
splitHorizontally n = map mirrorRect . splitVertically n . mirrorRect
|
splitHorizontally n = map mirrorRect . splitVertically n . mirrorRect
|
||||||
|
|
||||||
-- Divide the screen into two rectangles, using a rational to specify the ratio
|
-- Divide the screen into two rectangles, using a rational to specify the ratio
|
||||||
splitHorizontallyBy, splitVerticallyBy :: Rational -> Rectangle -> (Rectangle, Rectangle)
|
splitHorizontallyBy, splitVerticallyBy :: RealFrac r => r -> Rectangle -> (Rectangle, Rectangle)
|
||||||
splitHorizontallyBy f (Rectangle sx sy sw sh) =
|
splitHorizontallyBy f (Rectangle sx sy sw sh) =
|
||||||
( Rectangle sx sy leftw sh
|
( Rectangle sx sy leftw sh
|
||||||
, Rectangle (sx + fromIntegral leftw) sy (sw-fromIntegral leftw) sh)
|
, Rectangle (sx + fromIntegral leftw) sy (sw-fromIntegral leftw) sh)
|
||||||
|
Reference in New Issue
Block a user