Skip to content

Commit 030c8d2

Browse files
committed
wip
1 parent 76df52c commit 030c8d2

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

GUI/KeyView.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ renderKEvent keyColour = do
169169
renderToPixbuf :: DrawWindowClass dw => dw -> (Int, Int) -> C.Render ()
170170
-> IO Pixbuf
171171
renderToPixbuf similar (w, h) draw = do
172-
-- TODO: is this right???
172+
-- TODO: is this right??? I think so. It seems to work at least :shrug:
173173
renderWithDrawWindow similar draw
174174
pixbuf <- pixbufNewFromWindow similar 0 0 w h
175175
return pixbuf

GUI/Timeline.hs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ module GUI.Timeline (
2424
timelineCentreOnCursor,
2525
) where
2626

27+
import Debug.Trace
2728
import GUI.Types
2829
import GUI.Timeline.Types
2930

@@ -280,18 +281,21 @@ timelineViewNew builder actions = do
280281

281282
on timelineDrawingArea draw $ do
282283
liftIO $ do
284+
traceM "timelineDrawingArea"
283285
maybeEventArray <- readIORef hecsIORef
284286

285287
-- Check to see if an event trace has been loaded
286288
case maybeEventArray of
287289
Nothing -> return ()
288290
Just hecs -> do
291+
traceShowM "just hecs"
289292
params <- timelineGetViewParameters timelineWin
290293
-- render either the whole height of the timeline, or the window, whichever
291294
-- is larger (this just ensure we fill the background if the timeline is
292295
-- smaller than the window).
293296
exposeRect <- widgetGetAllocation timelineDrawingArea
294297
Rectangle _ _ _ h <- widgetGetAllocation timelineDrawingArea
298+
traceShowM exposeRect
295299
let params' = params { height = max (height params) h }
296300
selection <- readIORef selectionRef
297301
bookmarks <- readIORef bookmarkIORef

GUI/Timeline/Render.hs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@ import Data.IORef
5353
import Control.Monad
5454
import qualified Data.Text as T
5555

56+
import qualified Graphics.UI.Gtk.Cairo as C
57+
5658
-------------------------------------------------------------------------------
5759

5860
-- | This function redraws the currently visible part of the
@@ -113,7 +115,7 @@ renderView TimelineState{timelineDrawingArea, timelineVAdj, timelinePrevView}
113115
liftIO $ writeIORef timelinePrevView (Just (params, surface))
114116

115117
-- TODO: figure out what this did???
116-
-- region exposeRegion
118+
C.rectangle rect
117119
clip
118120
setSourceSurface surface 0 (-vadj_value)
119121
-- ^^ this is where we adjust for the vertical scrollbar

0 commit comments

Comments
 (0)