Skip to content

Commit

Permalink
autocomplete styling
Browse files Browse the repository at this point in the history
  • Loading branch information
brindy committed Oct 6, 2023
1 parent 6ad29af commit 5f78946
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions DuckDuckGo/AutocompleteViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -225,9 +225,10 @@ extension AutocompleteViewController: UITableViewDataSource {
cell.updateFor(query: query, suggestion: suggestions[indexPath.row], with: currentTheme, isAddressBarAtBottom: isAddressBarAtBottom)
cell.plusButton.tag = indexPath.row

let color = indexPath.row == selectedItem ? currentTheme.tableCellSelectedColor : UIColor(designSystemColor: .panel)

cell.backgroundColor = color
let baseBackgroundColor = isAddressBarAtBottom ? UIColor(designSystemColor: .background) : UIColor(designSystemColor: .panel)
let backgroundColor = indexPath.row == selectedItem ? currentTheme.tableCellSelectedColor : baseBackgroundColor

cell.backgroundColor = backgroundColor
cell.tintColor = currentTheme.autocompleteCellAccessoryColor
cell.setHighlightedStateBackgroundColor(currentTheme.tableCellHighlightedBackgroundColor)

Expand Down

0 comments on commit 5f78946

Please sign in to comment.