Use the Oxygen color palette for coloring applets in group mode (based on their category).

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=693736
This commit is contained in:
Aaron Eisenberg 2007-07-28 21:07:18 +00:00
parent cedc2934c4
commit 36649f248d

View File

@ -492,10 +492,31 @@ QColor Applet::color() const
{
// TODO: add more colors for more categories and
// maybe read from config?
if (category() == "Date and Time") {
return QColor(30, 60, 255, 200);
QString c = category();
int alpha = 200;
// Colors taken from Oxygen color palette
if (c == "Date and Time") {
return QColor(191, 94, 0, alpha);
} else if (c == "Environment & Weather") {
return QColor(191, 0, 0, alpha);
} else if (c == "Examples") {
return QColor(204, 0, 154, alpha);
} else if (c == "File System") {
return QColor(90, 0, 179, alpha);
} else if (c == "Graphics") {
return QColor(0, 0, 255, alpha);
} else if (c == "Language") {
return QColor(0, 191, 0, alpha);
} else if (c == "Mapping") {
return QColor(191, 245, 0, alpha);
} else if (c == "Online Services") {
return QColor(255, 213, 0, alpha);
} else if (c == "System Information") {
return QColor(0, 196, 204, alpha);
} else if (c == "Windows and Tasks") {
return QColor(255, 126, 0, alpha);
} else {
return QColor(20, 20, 20, 200);
return QColor(136, 136, 136, alpha);
}
}