mirror of
https://github.com/xmonad/xmonad-contrib.git
synced 2025-07-31 04:01:51 -07:00
Merge pull request #266 from LSLeary/master
Fix to X.L.Grid as per issue #223
This commit is contained in:
@@ -188,6 +188,11 @@
|
||||
|
||||
### Bug Fixes and Minor Changes
|
||||
|
||||
* `XMonad.Layout.Grid`
|
||||
|
||||
Fix as per issue #223; Grid will no longer calculate more columns than there
|
||||
are windows.
|
||||
|
||||
* XMonad.Hooks.FadeWindows
|
||||
|
||||
Added support for GHC version 8.4.x by adding a Semigroup instance for
|
||||
|
@@ -56,7 +56,7 @@ arrange :: Double -> Rectangle -> [a] -> [(a, Rectangle)]
|
||||
arrange aspectRatio (Rectangle rx ry rw rh) st = zip st rectangles
|
||||
where
|
||||
nwins = length st
|
||||
ncols = max 1 . round . sqrt $ fromIntegral nwins * fromIntegral rw / (fromIntegral rh * aspectRatio)
|
||||
ncols = max 1 . min nwins . round . sqrt $ fromIntegral nwins * fromIntegral rw / (fromIntegral rh * aspectRatio)
|
||||
mincs = max 1 $ nwins `div` ncols
|
||||
extrs = nwins - ncols * mincs
|
||||
chop :: Int -> Dimension -> [(Position, Dimension)]
|
||||
|
Reference in New Issue
Block a user