libsysprof-ui: simplify sizing of positioning in visualizers

This simplifies the visualizer sizing by avoiding the expanding sizes
when there is more space available. Doing so allows us to treat all the
sizing uniformly.

We can also make the ticks area a visualizer for more code re-use.
This commit is contained in:
Christian Hergert
2019-08-01 00:18:06 -07:00
parent 21643c71bf
commit 2d69a5ff1c
9 changed files with 155 additions and 289 deletions

View File

@ -438,27 +438,6 @@ sysprof_visualizer_group_insert (SysprofVisualizerGroup *self,
}
}
static void
propagate_data_width_cb (GtkWidget *widget,
gpointer user_data)
{
_sysprof_visualizer_set_data_width (SYSPROF_VISUALIZER (widget),
GPOINTER_TO_INT (user_data));
}
void
_sysprof_visualizer_group_set_data_width (SysprofVisualizerGroup *self,
gint width)
{
SysprofVisualizerGroupPrivate *priv = sysprof_visualizer_group_get_instance_private (self);
g_return_if_fail (SYSPROF_IS_VISUALIZER_GROUP (self));
gtk_container_foreach (GTK_CONTAINER (priv->visualizers),
propagate_data_width_cb,
GINT_TO_POINTER (width));
}
gint
sysprof_visualizer_group_get_priority (SysprofVisualizerGroup *self)
{