diff options
author | David Roundy <droundy@darcs.net> | 2007-09-25 21:21:17 +0200 |
---|---|---|
committer | David Roundy <droundy@darcs.net> | 2007-09-25 21:21:17 +0200 |
commit | e021d93178b52c3ec845bbaa6bb481a25468ebe1 (patch) | |
tree | 6318a9f7668dda9a25784d0c83f6b66bc524aad8 | |
parent | 5d42da6f605385a5692eaf34678e6d4524edad56 (diff) | |
download | XMonadContrib-e021d93178b52c3ec845bbaa6bb481a25468ebe1.tar.gz XMonadContrib-e021d93178b52c3ec845bbaa6bb481a25468ebe1.tar.xz XMonadContrib-e021d93178b52c3ec845bbaa6bb481a25468ebe1.zip |
make Accordian use pureLayout.
darcs-hash:20070925192117-72aca-db192d2f3dc458f06775cbbb3808cb9170925f8c.gz
-rw-r--r-- | Accordion.hs | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/Accordion.hs b/Accordion.hs index 5bfd77f..72f9d13 100644 --- a/Accordion.hs +++ b/Accordion.hs @@ -33,14 +33,9 @@ import Data.Ratio data Accordion a = Accordion deriving ( Read, Show ) instance Layout Accordion Window where - doLayout _ = accordionLayout - -accordionLayout :: Eq a => Rectangle -> W.Stack a -> X ([(a, Rectangle)], Maybe (Accordion a)) -accordionLayout sc ws = return ((zip ups tops) ++ - [(W.focus ws, mainPane)] ++ - (zip dns bottoms) - ,Nothing) - where ups = W.up ws + pureLayout _ sc ws = zip ups tops ++ [(W.focus ws, mainPane)] ++ zip dns bottoms + where + ups = W.up ws dns = W.down ws (top, allButTop) = splitVerticallyBy (1%8 :: Ratio Int) sc (center, bottom) = splitVerticallyBy (6%7 :: Ratio Int) allButTop |