diff options
author | Kai Grossjohann <kai@emptydomain.de> | 2007-07-21 22:40:26 +0200 |
---|---|---|
committer | Kai Grossjohann <kai@emptydomain.de> | 2007-07-21 22:40:26 +0200 |
commit | 50c635a862c38a0ca07b2e77068d6f2a58bbb487 (patch) | |
tree | 8544f9e088cb86f09f735a0a2219321f877186f6 | |
parent | 0ad5b3a5be07a6dcae53367c401080a379e5c3b1 (diff) | |
download | XMonadContrib-50c635a862c38a0ca07b2e77068d6f2a58bbb487.tar.gz XMonadContrib-50c635a862c38a0ca07b2e77068d6f2a58bbb487.tar.xz XMonadContrib-50c635a862c38a0ca07b2e77068d6f2a58bbb487.zip |
3col rounding
darcs-hash:20070721204026-07ca0-176eb30577633174db0f20f827923aff32ecad19.gz
Diffstat (limited to '')
-rw-r--r-- | ThreeColumns.hs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ThreeColumns.hs b/ThreeColumns.hs index c8edc5f..0abaac2 100644 --- a/ThreeColumns.hs +++ b/ThreeColumns.hs @@ -59,7 +59,7 @@ tile3 f r nmaster n where (r1, r2, r3) = split3HorizontallyBy f r (s1, s2) = splitHorizontallyBy f r nslave = (n - nmaster) - nmid = floor (nslave % 2) + nmid = ceiling (nslave % 2) nright = (n - nmaster - nmid) split3HorizontallyBy :: Rational -> Rectangle -> (Rectangle, Rectangle, Rectangle) @@ -67,6 +67,6 @@ split3HorizontallyBy f (Rectangle sx sy sw sh) = ( Rectangle sx sy leftw sh , Rectangle (sx + fromIntegral leftw) sy midw sh , Rectangle (sx + fromIntegral leftw + fromIntegral midw) sy rightw sh ) - where leftw = floor $ fromIntegral sw * (2/3) * f - midw = floor ( (sw - leftw) % 2 ) + where leftw = ceiling $ fromIntegral sw * (2/3) * f + midw = ceiling ( (sw - leftw) % 2 ) rightw = sw - leftw - midw |