ListView: computate disabled color only for disabled items.
This commit is contained in:
@@ -1723,16 +1723,16 @@ BListView::_CalcLastSelected(int32 before)
|
||||
void
|
||||
BListView::DrawItem(BListItem* item, BRect itemRect, bool complete)
|
||||
{
|
||||
rgb_color textColor = ui_color(B_LIST_ITEM_TEXT_COLOR);
|
||||
rgb_color disabledColor;
|
||||
if (textColor.red + textColor.green + textColor.blue > 128 * 3)
|
||||
disabledColor = tint_color(textColor, B_DARKEN_2_TINT);
|
||||
else
|
||||
disabledColor = tint_color(textColor, B_LIGHTEN_2_TINT);
|
||||
if (!item->IsEnabled()) {
|
||||
rgb_color textColor = ui_color(B_LIST_ITEM_TEXT_COLOR);
|
||||
rgb_color disabledColor;
|
||||
if (textColor.red + textColor.green + textColor.blue > 128 * 3)
|
||||
disabledColor = tint_color(textColor, B_DARKEN_2_TINT);
|
||||
else
|
||||
disabledColor = tint_color(textColor, B_LIGHTEN_2_TINT);
|
||||
|
||||
if (!item->IsEnabled())
|
||||
SetHighColor(disabledColor);
|
||||
else if (item->IsSelected())
|
||||
} else if (item->IsSelected())
|
||||
SetHighColor(ui_color(B_LIST_SELECTED_ITEM_TEXT_COLOR));
|
||||
else
|
||||
SetHighColor(ui_color(B_LIST_ITEM_TEXT_COLOR));
|
||||
|
||||
Reference in New Issue
Block a user