color-cycle: add color generator helper

We need a simple helper to choose colors for visualizers so
they do not overlap. This is just a simple cycle using some
predefined colors.

We should come up with something more unique in the future or
possibly do this with CSS and :nth-child(n) once we have access
to CSS nodes.
This commit is contained in:
Christian Hergert
2016-09-27 19:16:07 -07:00
parent 5a5bf1900f
commit e7e8e913b5
3 changed files with 163 additions and 0 deletions

View File

@ -159,6 +159,8 @@ libsysprof_ui_@API_VERSION@_la_SOURCES = \
$(uiheaders_DATA) \
sp-callgraph-view.c \
sp-cell-renderer-percent.c \
sp-color-cycle.c \
sp-color-cycle.h \
sp-cpu-visualizer-row.c \
sp-empty-state-view.c \
sp-failed-state-view.c \