Support up to B_MAX_CPU_COUNT distinct colors.

This fix #6541.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38531 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Philippe Houdoin 2010-09-05 08:09:00 +00:00
parent 040b33980c
commit 00a4277c4a

View File

@ -875,12 +875,16 @@ CPUUsageDataSource::_SetCPU(int32 cpu)
fShortLabel = fLabel;
fLabel << " usage";
const rgb_color kColors[] = {
const rgb_color kColors[B_MAX_CPU_COUNT] = {
// TODO: find some better defaults...
{200, 0, 200},
{0, 200, 200},
{80, 80, 80},
{230, 150, 50},
{255, 0, 0},
{0, 255, 0},
{0, 0, 255},
{0, 150, 230}
};
const uint32 kNumColors = sizeof(kColors) / sizeof(kColors[0]);