From de224f0ead3c76d6dca4c72fd6c4def15ca858bc Mon Sep 17 00:00:00 2001 From: Dmitry Malikov Date: Sun, 20 Jan 2013 02:01:10 +0400 Subject: New XPositions: TopP and BottomP --- src/Window.hs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/Window.hs') diff --git a/src/Window.hs b/src/Window.hs index e9a67cf..f43fe4b 100644 --- a/src/Window.hs +++ b/src/Window.hs @@ -59,10 +59,12 @@ setPosition :: XPosition -> [Rectangle] -> Dimension -> (Rectangle,Bool) setPosition p rs ht = case p' of Top -> (Rectangle rx ry rw h, True) + TopP l r -> (Rectangle (rx + fi l) ry (rw - fi l - fi r) h, True) TopW a i -> (Rectangle (ax a i) ry (nw i) h, True) TopSize a i ch -> (Rectangle (ax a i) ry (nw i) (mh ch), True) Bottom -> (Rectangle rx ny rw h, True) BottomW a i -> (Rectangle (ax a i) ny (nw i) h, True) + BottomP l r -> (Rectangle (rx + fi l) ny (rw - fi l - fi r) h, True) BottomSize a i ch -> (Rectangle (ax a i) (ny' ch) (nw i) (mh ch), True) Static cx cy cw ch -> (Rectangle (fi cx) (fi cy) (fi cw) (fi ch), True) OnScreen _ p'' -> setPosition p'' [scr] ht @@ -115,9 +117,11 @@ getStrutValues r@(Rectangle x y w h) p rwh = case p of OnScreen _ p' -> getStrutValues r p' rwh Top -> [0, 0, st, 0, 0, 0, 0, 0, nx, nw, 0, 0] + TopP _ _ -> [0, 0, st, 0, 0, 0, 0, 0, nx, nw, 0, 0] TopW _ _ -> [0, 0, st, 0, 0, 0, 0, 0, nx, nw, 0, 0] TopSize {} -> [0, 0, st, 0, 0, 0, 0, 0, nx, nw, 0, 0] Bottom -> [0, 0, 0, sb, 0, 0, 0, 0, 0, 0, nx, nw] + BottomP _ _ -> [0, 0, 0, sb, 0, 0, 0, 0, 0, 0, nx, nw] BottomW _ _ -> [0, 0, 0, sb, 0, 0, 0, 0, 0, 0, nx, nw] BottomSize {} -> [0, 0, 0, sb, 0, 0, 0, 0, 0, 0, nx, nw] Static {} -> getStaticStrutValues p rwh -- cgit v1.2.3