Skip to content

Commit ec3621a

Browse files
committed
wip
1 parent 030c8d2 commit ec3621a

File tree

5 files changed

+12
-4
lines changed

5 files changed

+12
-4
lines changed

GUI/DataFiles.hs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,15 @@ uiFile = "threadscope.ui"
2121
logoFile :: FilePath
2222
logoFile = "threadscope.png"
2323

24+
25+
2426
-- | Textual representation of the UI file
2527
ui :: Q Exp
2628
ui = [| TE.decodeUtf8 $(makeRelativeToProject uiFile >>= embedFile) |]
2729

30+
31+
32+
2833
renderLogo :: B.ByteString -> IO (Maybe Pixbuf)
2934
renderLogo bytes =
3035
withSystemTempFile logoFile $ \path h -> do

GUI/EventsView.hs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -287,8 +287,7 @@ drawEvents EventsView{drawArea, adj}
287287
layout <- layoutEmpty pangoCtx
288288
layoutSetEllipsize layout EllipsizeEnd
289289

290-
Rectangle _ _ width clipHeight <- widgetGetAllocation drawArea
291-
let clipRect = Rectangle 0 0 width clipHeight
290+
clipRect@(Rectangle _ _ width _) <- widgetGetAllocation drawArea
292291

293292
let -- With average char width, timeWidth is enough for 24 hours of logs
294293
-- (way more than TS can handle, currently). Aligns nicely with

GUI/Timeline/Render.hs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ import Events.HECs
2020
import GUI.Types
2121
import GUI.ViewerColours
2222
import GUI.Timeline.CairoDrawing
23+
import Debug.Trace
2324

2425
import Graphics.UI.Gtk hiding (rectangle)
2526
import Graphics.Rendering.Cairo
@@ -321,10 +322,11 @@ scrollView surface old new hecs = do
321322
-- and not only the newly exposed area. This is comparatively very cheap.
322323
updateXScaleArea :: TimelineState -> Timestamp -> IO ()
323324
updateXScaleArea TimelineState{..} lastTx = do
325+
traceM "updateXScaleArea"
324326
-- TODO: get rid of this Just
325327
Just win <- widgetGetWindow timelineXScaleArea
326328
Rectangle _ _ width _ <- widgetGetAllocation timelineDrawingArea
327-
Rectangle _ _ xScaleAreaHeight _ <- widgetGetAllocation timelineXScaleArea
329+
Rectangle _ _ _ xScaleAreaHeight <- widgetGetAllocation timelineXScaleArea
328330
scaleValue <- readIORef scaleIORef
329331
-- Snap the view to whole pixels, to avoid blurring.
330332
hadjValue0 <- adjustmentGetValue timelineAdj
@@ -342,6 +344,7 @@ renderYScaleArea :: ViewParameters -> HECs -> DrawingArea -> Render ()
342344
renderYScaleArea ViewParameters{maxSpkValue, labelsMode, viewTraces,
343345
histogramHeight, minterval}
344346
hecs yScaleArea = do
347+
traceM "updateXScaleArea"
345348
let maxP = maxSparkPool hecs
346349
maxH = fromIntegral $ maxYHistogram hecs
347350
Rectangle _ _ xoffset _ <- liftIO $ widgetGetAllocation yScaleArea

threadscope.cabal

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ Executable threadscope
7474

7575
include-dirs: include
7676
default-extensions: RecordWildCards, NamedFieldPuns, BangPatterns, PatternGuards
77+
other-extensions: TemplateHaskell
7778
Other-Modules: Events.HECs,
7879
Events.EventDuration,
7980
Events.EventTree,

threadscope.ui

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -593,7 +593,7 @@
593593
<property name="n_columns">2</property>
594594
<child>
595595
<object class="GtkDrawingArea" id="timeline_yscale_area">
596-
<property name="width_request">110</property>
596+
<property name="width_request">50</property>
597597
<property name="visible">True</property>
598598
</object>
599599
<packing>

0 commit comments

Comments
 (0)