@@ -13,6 +13,7 @@ module GUI.EventsView (
1313 ) where
1414
1515import GHC.RTS.Events
16+ import Debug.Trace
1617
1718import Graphics.UI.Gtk
1819import qualified GUI.GtkExtras as GtkExt
@@ -278,16 +279,19 @@ drawEvents EventsView{drawArea, adj}
278279
279280 -- TODO: don't use Just here
280281 Just win <- widgetGetWindow drawArea
281- style <- get drawArea widgetStyle
282- focused <- get drawArea widgetIsFocus
282+ style <- widgetGetStyle drawArea
283+ focused <- widgetGetIsFocus drawArea
284+ traceM " got is focus"
283285 let state | focused = StateSelected
284286 | otherwise = StateActive
285287
286288 pangoCtx <- widgetGetPangoContext drawArea
287289 layout <- layoutEmpty pangoCtx
288290 layoutSetEllipsize layout EllipsizeEnd
289291
290- clipRect@ (Rectangle _ _ width _) <- widgetGetAllocation drawArea
292+
293+ (Rectangle _ _ width _) <- widgetGetAllocation drawArea
294+ let clipRect = Rectangle 0 0 0 0
291295
292296 let -- With average char width, timeWidth is enough for 24 hours of logs
293297 -- (way more than TS can handle, currently). Aligns nicely with
@@ -299,6 +303,7 @@ drawEvents EventsView{drawArea, adj}
299303 columnGap = 20
300304 descrWidth = width - timeWidth - columnGap
301305
306+ traceM " draw each"
302307 sequence_
303308 [ do when (inside || selected) $
304309 GtkExt. stylePaintFlatBox
@@ -307,18 +312,23 @@ drawEvents EventsView{drawArea, adj}
307312 clipRect
308313 drawArea " "
309314 0 (round y) width (round lineHeight)
315+ traceM " stylePaint"
310316
311317 -- The event time
312318 layoutSetText layout (showEventTime event)
319+ traceM " set text"
313320 layoutSetAlignment layout AlignRight
321+ traceM " set align"
314322 layoutSetWidth layout (Just (fromIntegral timeWidth))
323+ traceM " set width"
315324 GtkExt. stylePaintLayout
316325 style win
317326 state2 True
318327 clipRect
319328 drawArea " "
320329 0 (round y)
321330 layout
331+ traceM " paint layout"
322332
323333 -- The event description text
324334 layoutSetText layout (showEventDescr event)
0 commit comments