Skip to content

Commit

Permalink
Fix #6154 - Filter logins field has wrong text color in Light theme (#…
Browse files Browse the repository at this point in the history
…6251)

* Fix #6154 - Filter logins field has wrong text color in Light theme

* Refactoring
  • Loading branch information
KrystynaKruchkovska committed Mar 30, 2020
1 parent d6e72a2 commit 6cbbc75
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions Client/Frontend/Login Management/LoginListViewController.swift
Expand Up @@ -190,10 +190,19 @@ class LoginListViewController: SensitiveViewController {

selectionButton.setTitleColor(UIColor.theme.tableView.rowBackground, for: [])
selectionButton.backgroundColor = UIColor.theme.general.highlightBlue

let theme = BuiltinThemeName(rawValue: ThemeManager.instance.current.name) ?? .normal
if theme == .dark {
searchController.searchBar.barStyle = .black

let isDarkTheme = ThemeManager.instance.currentName == .dark
let searchTextField = searchController.searchBar.searchTextField
if isDarkTheme {
searchTextField.defaultTextAttributes[NSAttributedString.Key.foregroundColor] = UIColor.white
} else {
searchTextField.defaultTextAttributes[NSAttributedString.Key.foregroundColor] = UIColor.black
}

if let glassIconView = searchTextField.leftView as? UIImageView {
//Magnifying glass
glassIconView.image = glassIconView.image?.withRenderingMode(.alwaysTemplate)
glassIconView.tintColor = UIColor.theme.tableView.headerTextLight
}
}

Expand Down

0 comments on commit 6cbbc75

Please sign in to comment.