Skip to content

Commit

Permalink
Merge pull request #314 from MichaelNeas/proposal/album-overlay-backg…
Browse files Browse the repository at this point in the history
…round

Configurable album overlay background and default starting point for album overlay proposal
  • Loading branch information
mikaoj authored May 21, 2021
2 parents e5415eb + b3e20ed commit 464dc40
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
3 changes: 3 additions & 0 deletions Sources/Model/Settings.swift
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ import Photos
/// Main background color
public lazy var backgroundColor: UIColor = .systemBackgroundColor

/// Color for backgroun of drop downs
public lazy var dropDownBackgroundColor: UIColor = .clear

/// What color to fill the circle with
public lazy var selectionFillColor: UIColor = UIView().tintColor

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,11 @@ class DropdownPresentationController: UIPresentationController {
// Match color with navigation bar
presentedViewController.view.backgroundColor = navigationBar.barTintColor
} else {
position = .zero
if #available(iOS 11.0, *) {
position = CGPoint(x: containerView.safeAreaInsets.left, y: containerView.safeAreaInsets.top)
} else {
position = .zero
}
}

return CGRect(origin: position, size: size)
Expand Down
2 changes: 1 addition & 1 deletion Sources/Scene/Albums/AlbumsViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ class AlbumsViewController: UIViewController {
tableView.register(AlbumCell.self, forCellReuseIdentifier: AlbumCell.identifier)
tableView.dataSource = dataSource
tableView.delegate = self
tableView.backgroundColor = .clear
tableView.backgroundColor = settings.theme.dropDownBackgroundColor
view.addSubview(tableView)

let lineHeight: CGFloat = 0.5
Expand Down

0 comments on commit 464dc40

Please sign in to comment.