summaryrefslogtreecommitdiffstats
path: root/lib/Phi/Border.hs
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Phi/Border.hs')
-rw-r--r--lib/Phi/Border.hs13
1 files changed, 1 insertions, 12 deletions
diff --git a/lib/Phi/Border.hs b/lib/Phi/Border.hs
index 4b32dd3..ca5e515 100644
--- a/lib/Phi/Border.hs
+++ b/lib/Phi/Border.hs
@@ -79,17 +79,6 @@ instance Eq s => Widget (Border w s c) s (BorderCache w s c) where
weight (Border config _) = borderWeight config
- layout (Border config w) s width height screen = case True of
- _ | width' > 0 -> layout w s width' height' screen
- | otherwise -> s
- where
- m = margin config
- bw = borderWidth config
- p = padding config
-
- width' = width - borderH m - 2*bw - borderH p
- height' = height - borderV m - 2*bw - borderV p
-
render (Border config w) s x y width height screen = case () of
_ | (width > borderH m - 2*bw - borderH p) -> do
border <- liftIO $ createImageSurface FormatARGB32 width height
@@ -104,7 +93,7 @@ instance Eq s => Widget (Border w s c) s (BorderCache w s c) where
let surfaces' = (True, 0, Nothing):(map (\(updated, SurfaceSlice x surf) -> (updated, x+dx, Just surf)) surfaces)++[(True, width-rightWidth, Nothing)]
surfacesWidths = zipWith (\(updated, x, surf) (_, x', _) -> (updated, x, x'-x, surf)) surfaces' (tail surfaces' ++ [(False, width, Nothing)])
forM surfacesWidths $ \(updated, x, surfWidth, surf) -> do
- surf' <- liftIO $ createImageSurface FormatARGB32 surfWidth height
+ surf' <- liftIO $ createImageSurface FormatARGB32 surfWidth height
renderWith surf' $ do
setOperator OperatorClear
paint