diff --git a/src/kits/interface/ListView.cpp b/src/kits/interface/ListView.cpp index 4b4aa71a81..7ec8234ae9 100644 --- a/src/kits/interface/ListView.cpp +++ b/src/kits/interface/ListView.cpp @@ -207,23 +207,8 @@ BListView::Draw(BRect updateRect) BListItem* item = ItemAt(i); itemFrame.bottom = itemFrame.top + ceilf(item->Height()) - 1; - 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 (itemFrame.Intersects(updateRect)) { - if (!item->IsEnabled()) - SetHighColor(disabledColor); - else if (item->IsSelected()) - SetHighColor(ui_color(B_LIST_SELECTED_ITEM_TEXT_COLOR)); - else - SetHighColor(ui_color(B_LIST_ITEM_TEXT_COLOR)); - + if (itemFrame.Intersects(updateRect)) DrawItem(item, itemFrame); - } itemFrame.top = itemFrame.bottom + 1; } @@ -1738,6 +1723,20 @@ 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()) + SetHighColor(disabledColor); + else if (item->IsSelected()) + SetHighColor(ui_color(B_LIST_SELECTED_ITEM_TEXT_COLOR)); + else + SetHighColor(ui_color(B_LIST_ITEM_TEXT_COLOR)); + item->DrawItem(this, itemRect, complete); } diff --git a/src/kits/interface/OutlineListView.cpp b/src/kits/interface/OutlineListView.cpp index ce8516e1fe..62bd2e01c6 100644 --- a/src/kits/interface/OutlineListView.cpp +++ b/src/kits/interface/OutlineListView.cpp @@ -925,7 +925,7 @@ BOutlineListView::DrawItem(BListItem* item, BRect itemRect, bool complete) } itemRect.left += LatchRect(itemRect, item->fLevel).right; - item->DrawItem(this, itemRect, complete); + BListView::DrawItem(item, itemRect, complete); }