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