Improve selected highlight on list view

This commit is contained in:
Ted John 2020-05-09 17:14:06 +01:00
parent f492827c8a
commit cc759e0bce
1 changed files with 5 additions and 7 deletions

View File

@ -512,16 +512,14 @@ void CustomListView::Paint(rct_window* w, rct_drawpixelinfo* dpi, const rct_scro
auto isStriped = IsStriped && (i & 1); auto isStriped = IsStriped && (i & 1);
auto isHighlighted = (HighlightedCell && itemIndex == HighlightedCell->Row); auto isHighlighted = (HighlightedCell && itemIndex == HighlightedCell->Row);
auto isSelected = (SelectedCell && itemIndex == SelectedCell->Row); auto isSelected = (SelectedCell && itemIndex == SelectedCell->Row);
if (isHighlighted) if (isSelected)
{
gfx_filter_rect(dpi, dpi->x, y, dpi->x + dpi->width, y + (LIST_ROW_HEIGHT - 1), PALETTE_DARKEN_2);
}
else if (isHighlighted)
{ {
gfx_filter_rect(dpi, dpi->x, y, dpi->x + dpi->width, y + (LIST_ROW_HEIGHT - 1), PALETTE_DARKEN_1); gfx_filter_rect(dpi, dpi->x, y, dpi->x + dpi->width, y + (LIST_ROW_HEIGHT - 1), PALETTE_DARKEN_1);
} }
else if (isSelected)
{
// gfx_fill_rect(dpi, dpi->x, y, dpi->x + dpi->width, y + LIST_ROW_HEIGHT - 1,
// ColourMapA[w->colours[1]].dark);
gfx_filter_rect(dpi, dpi->x, y, dpi->x + dpi->width, y + (LIST_ROW_HEIGHT - 1), PALETTE_DARKEN_2);
}
else if (isStriped) else if (isStriped)
{ {
gfx_fill_rect( gfx_fill_rect(