@@ -13,6 +13,7 @@ module GUI.EventsView (
13
13
) where
14
14
15
15
import GHC.RTS.Events
16
+ import Debug.Trace
16
17
17
18
import Graphics.UI.Gtk
18
19
import qualified GUI.GtkExtras as GtkExt
@@ -278,16 +279,19 @@ drawEvents EventsView{drawArea, adj}
278
279
279
280
-- TODO: don't use Just here
280
281
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"
283
285
let state | focused = StateSelected
284
286
| otherwise = StateActive
285
287
286
288
pangoCtx <- widgetGetPangoContext drawArea
287
289
layout <- layoutEmpty pangoCtx
288
290
layoutSetEllipsize layout EllipsizeEnd
289
291
290
- clipRect@ (Rectangle _ _ width _) <- widgetGetAllocation drawArea
292
+
293
+ (Rectangle _ _ width _) <- widgetGetAllocation drawArea
294
+ let clipRect = Rectangle 0 0 0 0
291
295
292
296
let -- With average char width, timeWidth is enough for 24 hours of logs
293
297
-- (way more than TS can handle, currently). Aligns nicely with
@@ -299,6 +303,7 @@ drawEvents EventsView{drawArea, adj}
299
303
columnGap = 20
300
304
descrWidth = width - timeWidth - columnGap
301
305
306
+ traceM " draw each"
302
307
sequence_
303
308
[ do when (inside || selected) $
304
309
GtkExt. stylePaintFlatBox
@@ -307,18 +312,23 @@ drawEvents EventsView{drawArea, adj}
307
312
clipRect
308
313
drawArea " "
309
314
0 (round y) width (round lineHeight)
315
+ traceM " stylePaint"
310
316
311
317
-- The event time
312
318
layoutSetText layout (showEventTime event)
319
+ traceM " set text"
313
320
layoutSetAlignment layout AlignRight
321
+ traceM " set align"
314
322
layoutSetWidth layout (Just (fromIntegral timeWidth))
323
+ traceM " set width"
315
324
GtkExt. stylePaintLayout
316
325
style win
317
326
state2 True
318
327
clipRect
319
328
drawArea " "
320
329
0 (round y)
321
330
layout
331
+ traceM " paint layout"
322
332
323
333
-- The event description text
324
334
layoutSetText layout (showEventDescr event)
0 commit comments