Skip to content

Commit 9d2a159

Browse files
committed
Fix indentation errors
1 parent c0209a7 commit 9d2a159

File tree

2 files changed

+48
-48
lines changed

2 files changed

+48
-48
lines changed

GUI/Timeline.hs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -218,9 +218,9 @@ timelineViewNew builder actions@TimelineViewActions{..} = do
218218
mouseStateVar <- newIORef None
219219

220220
let withMouseState action = liftIO $ do
221-
st <- readIORef mouseStateVar
222-
st' <- action st
223-
writeIORef mouseStateVar st'
221+
st <- readIORef mouseStateVar
222+
st' <- action st
223+
writeIORef mouseStateVar st'
224224

225225
on timelineDrawingArea buttonPressEvent $ do
226226
(x,_y) <- eventCoordinates

GUI/Timeline/Render.hs

Lines changed: 45 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -76,51 +76,51 @@ renderView TimelineState{timelineDrawingArea, timelineVAdj, timelinePrevView}
7676
win <- widgetGetDrawWindow timelineDrawingArea
7777
renderWithDrawable win $ do
7878

79-
let renderToNewSurface = do
80-
new_surface <- withTargetSurface $ \surface ->
81-
liftIO $ createSimilarSurface surface ContentColor w (height params)
82-
renderWith new_surface $ do
83-
clearWhite
84-
renderTraces params hecs rect
85-
return new_surface
86-
87-
surface <-
88-
case prev_view of
89-
Nothing -> renderToNewSurface
90-
91-
Just (old_params, surface)
92-
| old_params == params
93-
-> return surface
94-
95-
| width old_params == width params &&
96-
height old_params == height params
97-
-> do
98-
if old_params { hadjValue = hadjValue params } == params
99-
-- only the hadjValue changed
100-
&& abs (hadjValue params - hadjValue old_params) <
101-
fromIntegral (width params) * scaleValue params
102-
-- and the views overlap...
103-
then
104-
scrollView surface old_params params hecs
105-
else do
106-
renderWith surface $ do
107-
clearWhite; renderTraces params hecs rect
108-
return surface
109-
110-
| otherwise
111-
-> do surfaceFinish surface
112-
renderToNewSurface
113-
114-
liftIO $ writeIORef timelinePrevView (Just (params, surface))
115-
116-
region exposeRegion
117-
clip
118-
setSourceSurface surface 0 (-vadj_value)
119-
-- ^^ this is where we adjust for the vertical scrollbar
120-
setOperator OperatorSource
121-
paint
122-
renderBookmarks bookmarks params
123-
drawSelection params selection
79+
let renderToNewSurface = do
80+
new_surface <- withTargetSurface $ \surface ->
81+
liftIO $ createSimilarSurface surface ContentColor w (height params)
82+
renderWith new_surface $ do
83+
clearWhite
84+
renderTraces params hecs rect
85+
return new_surface
86+
87+
surface <-
88+
case prev_view of
89+
Nothing -> renderToNewSurface
90+
91+
Just (old_params, surface)
92+
| old_params == params
93+
-> return surface
94+
95+
| width old_params == width params &&
96+
height old_params == height params
97+
-> do
98+
if old_params { hadjValue = hadjValue params } == params
99+
-- only the hadjValue changed
100+
&& abs (hadjValue params - hadjValue old_params) <
101+
fromIntegral (width params) * scaleValue params
102+
-- and the views overlap...
103+
then
104+
scrollView surface old_params params hecs
105+
else do
106+
renderWith surface $ do
107+
clearWhite; renderTraces params hecs rect
108+
return surface
109+
110+
| otherwise
111+
-> do surfaceFinish surface
112+
renderToNewSurface
113+
114+
liftIO $ writeIORef timelinePrevView (Just (params, surface))
115+
116+
region exposeRegion
117+
clip
118+
setSourceSurface surface 0 (-vadj_value)
119+
-- ^^ this is where we adjust for the vertical scrollbar
120+
setOperator OperatorSource
121+
paint
122+
renderBookmarks bookmarks params
123+
drawSelection params selection
124124

125125
-------------------------------------------------------------------------------
126126

0 commit comments

Comments
 (0)