summaryrefslogtreecommitdiffstats
path: root/lib/Phi/X11.hs
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2011-07-14 01:47:10 +0200
committerMatthias Schiffer <mschiffer@universe-factory.net>2011-07-14 01:47:10 +0200
commit222ba3fe0be82341d6cf31de2f9d3387869f1b1a (patch)
tree8b28648ef8c1aa4d2b832905139daf325efc44b4 /lib/Phi/X11.hs
parent55d15b73caa4b8d74cf7d678842da69302e600d9 (diff)
downloadphi-222ba3fe0be82341d6cf31de2f9d3387869f1b1a.tar
phi-222ba3fe0be82341d6cf31de2f9d3387869f1b1a.zip
Added widget layout functions
Diffstat (limited to 'lib/Phi/X11.hs')
-rw-r--r--lib/Phi/X11.hs7
1 files changed, 2 insertions, 5 deletions
diff --git a/lib/Phi/X11.hs b/lib/Phi/X11.hs
index 057d1ee..b79001c 100644
--- a/lib/Phi/X11.hs
+++ b/lib/Phi/X11.hs
@@ -115,17 +115,14 @@ updatePanels redraw = do
newPanel <- if not redraw then return panel else do
let surface = panelSurface panel
area = panelArea panel
- layoutedWidgets = Widget.layoutWidgets (panelWidgetStates panel) (fromIntegral $ rect_width area) (fromIntegral $ rect_height area)
+ layoutedWidgets = withDimension area $ Widget.layoutWidgets (panelWidgetStates panel) 0 0
panel' = panel { panelWidgetStates = layoutedWidgets }
-- draw background
liftIO $ withRectangle (panelArea panel) (copyArea disp rootPixmap (panelPixmap panel) (panelGC panel)) 0 0
surfaceMarkDirty surface
- renderWith surface $ do
- save
- Widget.renderWidgets layoutedWidgets
- restore
+ renderWith surface $ Widget.renderWidgets layoutedWidgets
surfaceFlush surface
return panel'