
On Sat, Jul 21, 2007 at 10:43:26PM +0200, Kai Grossjohann wrote:
On Sat, Jul 21, 2007 at 04:56:16PM +0200, Kai Grossjohann wrote:
Below, please find a patch that implements a three column layout. Beware that I don't know Haskell at all. It seems to work for me, but I am surprised.
Improved version below.
This behaves very strangely when increasing nmaster. It seems that 3col layout then disappears completely, or behaves like 2col. Do others see this, too? Why? ... +threeCol :: Int -> Rational -> Rational -> Layout a +threeCol nmaster delta frac = + Layout { doLayout = \r -> return . (\x->(x,Nothing)) . + ap zip (tile3 frac r nmaster . length) . W.integrate + , modifyLayout = \m -> return $ msum [fmap resize (fromMessage m) + ,fmap incmastern (fromMessage m)] } + + where resize Shrink = tall nmaster delta (max 0 $ frac-delta) + resize Expand = tall nmaster delta (min 1 $ frac+delta) + incmastern (IncMasterN d) = tall (max 0 (nmaster+d)) delta frac
Your response to resize and incmaster events is to switch to a "tall" layout. Replace the above talls with threeCol and this should be fixed. -- David Roundy http://www.darcs.net