aboutsummaryrefslogtreecommitdiffstats
path: root/XMonad/Layout
diff options
context:
space:
mode:
authorDevin Mullins <me@twifkak.com>2008-09-22 05:33:54 +0200
committerDevin Mullins <me@twifkak.com>2008-09-22 05:33:54 +0200
commita0603c8470ea8304e1c927783c83f7439c3a7e66 (patch)
tree2e6da5e3efa3634fa29af6d204fb2f0453e7fde2 /XMonad/Layout
parent577a6c9b6654cf2e3007bce0fa56334e45be06b1 (diff)
downloadXMonadContrib-a0603c8470ea8304e1c927783c83f7439c3a7e66.tar.gz
XMonadContrib-a0603c8470ea8304e1c927783c83f7439c3a7e66.tar.xz
XMonadContrib-a0603c8470ea8304e1c927783c83f7439c3a7e66.zip
flip GridRatio to match convention (x/y)
darcs-hash:20080922033354-78224-4cb510268e145cf992aaec818f9d3da125cb1fa8.gz
Diffstat (limited to 'XMonad/Layout')
-rw-r--r--XMonad/Layout/Grid.hs6
1 files changed, 3 insertions, 3 deletions
diff --git a/XMonad/Layout/Grid.hs b/XMonad/Layout/Grid.hs
index 09de582..be497bd 100644
--- a/XMonad/Layout/Grid.hs
+++ b/XMonad/Layout/Grid.hs
@@ -36,7 +36,7 @@ import XMonad.StackSet
-- You can also specify an aspect ratio for Grid to strive for with the
-- GridRatio constructor:
--
--- > myLayouts = GridRatio (3/4) ||| etc.
+-- > myLayouts = GridRatio (4/3) ||| etc.
--
-- For more detailed instructions on editing the layoutHook see:
--
@@ -45,7 +45,7 @@ import XMonad.StackSet
data Grid a = Grid | GridRatio Double deriving (Read, Show)
defaultRatio :: Double
-defaultRatio = 9/16
+defaultRatio = 16/9
instance LayoutClass Grid a where
pureLayout Grid r = pureLayout (GridRatio defaultRatio) r
@@ -55,7 +55,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 $ aspectRatio * fromIntegral nwins * fromIntegral rw / fromIntegral rh
+ ncols = max 1 . round . sqrt $ fromIntegral nwins * fromIntegral rw / (fromIntegral rh * aspectRatio)
mincs = nwins `div` ncols
extrs = nwins - ncols * mincs
chop :: Int -> Dimension -> [(Position, Dimension)]