diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2011-07-18 20:57:19 +0200 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2011-07-18 20:57:19 +0200 |
commit | 581e1f9c63101fd2a00711748415997b0c20b793 (patch) | |
tree | ab2ee291354819727939593655e0a53383870b03 /lib/Phi/Widgets/AlphaBox.hs | |
parent | 4cc0f0f2ee44aa5c65b8b7f759620b5de0c874a3 (diff) | |
download | phi-581e1f9c63101fd2a00711748415997b0c20b793.tar phi-581e1f9c63101fd2a00711748415997b0c20b793.zip |
Make minSize depend on the screen if necessary
Diffstat (limited to 'lib/Phi/Widgets/AlphaBox.hs')
-rw-r--r-- | lib/Phi/Widgets/AlphaBox.hs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Phi/Widgets/AlphaBox.hs b/lib/Phi/Widgets/AlphaBox.hs index 3ed31d0..c09b911 100644 --- a/lib/Phi/Widgets/AlphaBox.hs +++ b/lib/Phi/Widgets/AlphaBox.hs @@ -20,12 +20,12 @@ instance WidgetClass AlphaBox where type WidgetData AlphaBox = AlphaBoxState initWidget (AlphaBox _ widgets) phi disp = liftM AlphaBoxState $ mapM (createWidgetState phi disp) widgets - minSize (AlphaBox _ _) (AlphaBoxState widgetStates) height = - sum (map (\(WidgetState {stateWidget = w, statePrivateData = priv}) -> minSize w priv height) widgetStates) + minSize (AlphaBox _ _) (AlphaBoxState widgetStates) height screen = + sum (map (\(WidgetState {stateWidget = w, statePrivateData = priv}) -> minSize w priv height screen) widgetStates) weight (AlphaBox _ widgets) = sum (map (\(Widget w) -> weight w) widgets) - layout (AlphaBox _ _) (AlphaBoxState widgetStates) width height = AlphaBoxState $ layoutWidgets widgetStates 0 0 width height + layout (AlphaBox _ _) (AlphaBoxState widgetStates) width height screen = AlphaBoxState $ layoutWidgets widgetStates 0 0 width height screen render (AlphaBox alpha _) (AlphaBoxState widgetStates) w h screen = do renderWithSimilarSurface ContentColorAlpha w h $ \surface -> do |