Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

[QuickSearch] Private Mode BG fix

  • Loading branch information
Tim Palade authored and sharath-cliqz committed Sep 7, 2018
1 parent 912c058 commit fd2d468c40e74b9ffe05ae2872d044b16947b6e6
Showing with 11 additions and 7 deletions.
  1. +11 −7 Cliqz/Search/FirefoxSearchViewController.swift
@@ -53,6 +53,8 @@ class FirefoxSearchViewController: SiteTableViewController, KeyboardHelperDelega
fileprivate let isPrivate: Bool
fileprivate var suggestClient: SearchSuggestClient?

var privateModeOverlay: UIView = UIView.overlay(frame: CGRect.zero)

// Views for displaying the bottom scrollable search engine list. searchEngineScrollView is the
// scrollable container; searchEngineScrollViewContent contains the actual set of search engine buttons.
fileprivate let searchEngineScrollView = ButtonScrollView()
@@ -85,12 +87,13 @@ class FirefoxSearchViewController: SiteTableViewController, KeyboardHelperDelega

@objc func orientationDidChange(_ notification: Notification) {
backgroundImage.image = BackgroundImageManager.shared.getImage()
if isPrivate {
privateModeOverlay.frame = self.view.bounds
}
}

override func viewDidLoad() {
view.backgroundColor = .clear //UIConstants.PanelBackgroundColor
// let blur = UIVisualEffectView(effect: UIBlurEffect(style: .light))
// view.addSubview(blur)
view.backgroundColor = .clear

super.viewDidLoad()

@@ -107,6 +110,11 @@ class FirefoxSearchViewController: SiteTableViewController, KeyboardHelperDelega

backgroundImage.image = BackgroundImageManager.shared.getImage()

if isPrivate {
privateModeOverlay = UIView.overlay(frame: self.view.bounds)
self.backgroundImage.addSubview(privateModeOverlay)
}

searchEngineScrollView.layer.backgroundColor = SearchViewControllerUX.SearchEngineScrollViewBackgroundColor
searchEngineScrollView.layer.shadowRadius = 0
searchEngineScrollView.layer.shadowOpacity = 100
@@ -136,10 +144,6 @@ class FirefoxSearchViewController: SiteTableViewController, KeyboardHelperDelega
make.bottom.equalTo(self.searchEngineScrollView)
}

// blur.snp.makeConstraints { make in
// make.edges.equalTo(self.view)
// }
tableView.backgroundColor = .clear
tableView.separatorColor = UIColor.white.withAlphaComponent(0.4)

0 comments on commit fd2d468

Please sign in to comment.