Skip to content
This repository has been archived by the owner on May 10, 2024. It is now read-only.

Fix #7615: Don't leak status bar color while in overlay mode. #7616

Merged
merged 1 commit into from
Jun 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Sources/Brave/Frontend/Browser/BrowserViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ public class BrowserViewController: UIViewController {
var readerModeBar: ReaderModeBarView?
var readerModeCache: ReaderModeCache

private let statusBarOverlay: UIView = {
let statusBarOverlay: UIView = {
// Temporary work around for covering the non-clipped web view content
let statusBarOverlay = UIView()
statusBarOverlay.backgroundColor = Preferences.General.nightModeEnabled.value ? .nightModeBackground : .urlBarBackground
Expand Down Expand Up @@ -784,8 +784,8 @@ public class BrowserViewController: UIViewController {
view.addSubview(topTouchArea)
view.addSubview(bottomBarKeyboardBackground)
view.addSubview(footer)
view.addSubview(header)
view.addSubview(statusBarOverlay)
view.addSubview(header)

// For now we hide some elements so they are not visible
header.isHidden = true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -731,7 +731,11 @@ extension BrowserViewController: TopToolbarDelegate {
if let ntpController = self.activeNewTabPageViewController, ntpController.parent != nil {
view.insertSubview(favoritesController.view, aboveSubview: ntpController.view)
} else {
view.insertSubview(favoritesController.view, aboveSubview: footer)
// Two different behaviors here:
// 1. For bottom bar we do not want to show the status bar color
// 2. For top bar we do so it matches the address bar background
let subview = isUsingBottomBar ? statusBarOverlay : footer
view.insertSubview(favoritesController.view, aboveSubview: subview)
}
favoritesController.didMove(toParent: self)

Expand Down