Rename B_COLOR_WHICH_COUNT to kColorWhichCount
This commit is contained in:
@@ -78,7 +78,7 @@ DesktopSettingsPrivate::_SetDefaults()
|
||||
fWorkspacesRows = 2;
|
||||
|
||||
memcpy(fShared.colors, BPrivate::kDefaultColors,
|
||||
sizeof(rgb_color) * B_COLOR_WHICH_COUNT);
|
||||
sizeof(rgb_color) * kColorWhichCount);
|
||||
|
||||
gSubpixelAntialiasing = false;
|
||||
gDefaultHintingMode = HINTING_MODE_ON;
|
||||
@@ -292,7 +292,7 @@ DesktopSettingsPrivate::_Load()
|
||||
}
|
||||
|
||||
// colors
|
||||
for (int32 i = 0; i < B_COLOR_WHICH_COUNT; i++) {
|
||||
for (int32 i = 0; i < kColorWhichCount; i++) {
|
||||
char colorName[12];
|
||||
snprintf(colorName, sizeof(colorName), "color%" B_PRId32,
|
||||
(int32)index_to_color_which(i));
|
||||
@@ -437,7 +437,7 @@ DesktopSettingsPrivate::Save(uint32 mask)
|
||||
settings.AddInt8("subpixel average weight", gSubpixelAverageWeight);
|
||||
settings.AddBool("subpixel ordering", gSubpixelOrderingRGB);
|
||||
|
||||
for (int32 i = 0; i < B_COLOR_WHICH_COUNT; i++) {
|
||||
for (int32 i = 0; i < kColorWhichCount; i++) {
|
||||
char colorName[12];
|
||||
snprintf(colorName, sizeof(colorName), "color%" B_PRId32,
|
||||
(int32)index_to_color_which(i));
|
||||
@@ -650,7 +650,7 @@ void
|
||||
DesktopSettingsPrivate::SetUIColor(color_which which, const rgb_color color)
|
||||
{
|
||||
int32 index = color_which_to_index(which);
|
||||
if (index < 0 || index >= B_COLOR_WHICH_COUNT)
|
||||
if (index < 0 || index >= kColorWhichCount)
|
||||
return;
|
||||
|
||||
fShared.colors[index] = color;
|
||||
@@ -658,6 +658,7 @@ DesktopSettingsPrivate::SetUIColor(color_which which, const rgb_color color)
|
||||
// otherwise we have to keep this duplication...
|
||||
if (which == B_MENU_BACKGROUND_COLOR)
|
||||
fMenuInfo.background_color = color;
|
||||
|
||||
Save(kAppearanceSettings);
|
||||
}
|
||||
|
||||
@@ -667,8 +668,9 @@ 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 >= B_COLOR_WHICH_COUNT)
|
||||
if (index < 0 || index >= kColorWhichCount)
|
||||
return invalidColor;
|
||||
|
||||
return fShared.colors[index];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user