Exemple #1
0
rgb_color
DesktopSettingsPrivate::UIColor(color_which which) const
{
    static const rgb_color invalidColor = {0, 0, 0, 0};
    int32 index = color_which_to_index(which);
    if (index < 0 || index >= kNumColors)
        return invalidColor;
    return fShared.colors[index];
}
Exemple #2
0
/*!
	\brief Assigns the default system colors to the passed ColorSet object
	\param set The ColorSet object to set to defaults
*/
ColorSet
ColorSet::DefaultColorSet(void)
{
	ColorSet set;
	
	for (int i = 0; i < sColorDescriptionCount; i++) {
		color_which which = get_color_description(i)->which;
		set.fColors[which] =
			BPrivate::kDefaultColors[color_which_to_index(which)];
	}
	return set;
}
Exemple #3
0
void
DesktopSettingsPrivate::SetUIColor(color_which which, const rgb_color color)
{
    //
    int32 index = color_which_to_index(which);
    if (index < 0 || index >= kNumColors)
        return;
    fShared.colors[index] = color;
    // TODO: deprecate the background_color member of the menu_info struct,
    // otherwise we have to keep this duplication...
    if (which == B_MENU_BACKGROUND_COLOR)
        fMenuInfo.background_color = color;
    Save(kAppearanceSettings);
}