Fixes incorrect Sources tab background color in dark mode

This commit is contained in:
Riley Testut
2023-10-19 13:39:15 -05:00
committed by Magesh K
parent 89347ffffa
commit c3820136a6
3 changed files with 8 additions and 0 deletions

View File

@@ -50,6 +50,8 @@ class BrowseViewController: UICollectionViewController, PeekPopPreviewing
{
super.viewDidLoad()
self.collectionView.backgroundColor = .altBackground
#if BETA
self.dataSource.searchController.searchableKeyPaths = [#keyPath(InstalledApp.name)]
self.navigationItem.searchController = self.dataSource.searchController

View File

@@ -85,6 +85,8 @@ class NewsViewController: UICollectionViewController, PeekPopPreviewing
{
super.viewDidLoad()
self.collectionView.backgroundColor = .altBackground
self.prototypeCell = NewsCollectionViewCell.instantiate(with: NewsCollectionViewCell.nib!)
self.prototypeCell.contentView.translatesAutoresizingMaskIntoConstraints = false

View File

@@ -60,6 +60,8 @@ class SourceDetailContentViewController: UICollectionViewController
{
super.viewDidLoad()
self.collectionView.backgroundColor = .altBackground
let collectionViewLayout = self.makeLayout(source: self.source)
self.collectionView.collectionViewLayout = collectionViewLayout
@@ -221,6 +223,7 @@ private extension SourceDetailContentViewController
// For some reason, setting cell.layoutMargins = .zero does not update cell.contentView.layoutMargins.
cell.layoutMargins = .zero
cell.contentView.layoutMargins = .zero
cell.contentView.backgroundColor = .altBackground
cell.bannerView.configure(for: storeApp)
@@ -300,6 +303,7 @@ private extension SourceDetailContentViewController
cell.contentView.layoutMargins = .zero // Fixes incorrect margins if not initially on screen.
cell.textView.text = source.localizedDescription
cell.textView.isCollapsed = false
cell.textView.backgroundColor = .altBackground
}
return dataSource