Commit Graph

18 Commits

Author SHA1 Message Date
20f9f47966 selection: rename SpVisualizerSelection to SpSelection
We want this in sysprof.h (without UI components) so that we
can use it to filter things in profilers. Therefore, we don't
need to make it namespaced to "visualizers" since a time range
selection is a fairly straightforward, and non-UI confined
implementation.
2016-10-10 16:24:22 -07:00
034a7d881f visualizer-view: ensure types are registered
These have the chance of being dropped unless we export them
here manually. We probably should change how we export symbols
so this isn't required in the future.
2016-10-09 12:36:28 -07:00
7c55f379bb theme-manager: add SpThemeManager and use it for custom css
We want to set some custom backgrounds for the visualizers, and
those need to track with the current theme. SpThemeManager will
watch the systems theme changes (including dark theme) and
update the loaded CSS resources as necessary.
2016-10-08 16:28:18 -07:00
aa61c43547 visualizer-view: fix selections when scrolling
If we have a scrolled view, we might be a bit off on the
selected range until this commit. This adjusts for the scrolled
area and ensures that both ticks and selections land in the
right place.
2016-10-08 15:36:01 -07:00
70aeeb66bc visualizer-selection: initial visualizer selection support
This gets started on allowing the user to select a region.
Nothing is yet responding to the changes in selection, but
that can come later.

Ideally, we will truncate (or mark rows invisible/insensitive)
if they do not fall within the selected time region.
2016-10-08 13:40:12 -07:00
72a8276faf visualizer-view: fix time range for ticks
This uses the graph_width to get the proper time range of the
visualizer row. Mostly, this is just complicated because we
the ticks to be an overlay rather than inline with the list
rows.
2016-10-06 21:03:01 -07:00
51ed367b74 wip: visualizer work 2016-10-05 09:40:08 -07:00
6d9656e6fe visualizer-view: use queue_resize instead of queue_draw
We need everything to update from this widget down the widget
hierarchy so they all get redrawn. Queuing a resize will ensure
that happens.
2016-10-04 12:29:50 -07:00
8d8c879384 visualizer-view: add helper viewport for scrolling
We can avoid using the inline scrollbar in favor of overlay
scrolling if we bridge the adjustment into the GtkViewport.
This sadly requires us to subclass things to get it just
right.
2016-10-03 16:08:13 -07:00
59cbd8fc3f visualizer-view: fix logic on swapping times 2016-10-03 16:06:00 -07:00
5c53dd5d6e visualizer-view: avoid overscroll upon zoom change
When changing the zoom (zooming out), we could potentially
let the scrollbar be past the end. This looks pretty bad when
the GtkWindow doesn't clip correctly.

This just adjusts things so we push ourselves back into the
visible area.
2016-09-30 17:04:48 -07:00
c116120563 visualizer-ticks: adjust ticks for capture epoch
We need to take into account the real start of the capture to
land the ticks in the right position. Add "epoch" concept
to SpVisualizerTicks for just this purpose.
2016-09-30 13:21:17 -07:00
75332678a6 visualizer-view: dynamically toggle scrollbar visibility
Generally we want this thing hidden, so only show it if we have
zoomed in enough to cause it to be useful.

We need to also find a way for the container to be able to
handle the change in size request and adjust the GtkPaned
to be non-ugly.
2016-09-29 17:49:53 -07:00
caa95fcca7 visualizer-view: implement basic panning
There are lots of little things that need fixing, such as the
ticks positioning, and reusing surfaces as much as possible, but
this gets our "MVP" panning in place.
2016-09-29 14:37:00 -07:00
b9b96184cd visualizers: wire zoom manager to visualizers
This gets the basic zoom control working. I anticipate we'll
need some additional changes once we land panning support.
2016-09-28 19:56:39 -07:00
7831b767d0 visualizer-view: shrink time range when necessary
If we don't have a minute worth of input, we should shrink the
visible area to exactly what we came across.

We still have the issue of the UI creating the capture file
before auth has completed, but we can fix that later so we
have a "semantically" correct start time.
2016-09-28 14:10:29 -07:00
b5fccca069 visualizer-view: add ::visualizer-added and ::visualizer-removed
These signals are emitted when a visualizer row has been added
or removed from the view. This might be handy if you want to
resize a paned based on the natural size of the visualizers.
2016-09-28 13:22:51 -07:00
f8a0f2701e visualizer-view: add SpVisualizerView
This adds a new helper widget SpVisualizerView to simplify using
visualizers from applications using libsysprof-ui-2 such as
Builder.

We can manage the view range, zoom, etc from this widget going
forward.
2016-09-27 23:15:56 -07:00