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

Fix #8547: Page zoom freeze #8570

Merged
merged 1 commit into from
Dec 15, 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
8 changes: 2 additions & 6 deletions Sources/Brave/Frontend/Browser/BrowserViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -1537,7 +1537,7 @@ public class BrowserViewController: UIViewController {
toolbar?.line.isHidden = isUsingBottomBar
}

header.expandedBarStackView.removeArrangedSubview(tabsBar.view)
tabsBar.view.removeFromSuperview()
if isUsingBottomBar {
header.expandedBarStackView.insertArrangedSubview(tabsBar.view, at: 0)
} else {
Expand Down Expand Up @@ -2340,11 +2340,6 @@ public class BrowserViewController: UIViewController {
func displayPageZoom(visible: Bool) {
if !visible || pageZoomBar != nil {
pageZoomBar?.view.removeFromSuperview()

if let zoomBarView = pageZoomBar?.view {
alertStackView.removeArrangedSubview(zoomBarView)
}

updateViewConstraints()
pageZoomBar = nil

Expand Down Expand Up @@ -2379,6 +2374,7 @@ public class BrowserViewController: UIViewController {

pageZoomBar.view.snp.makeConstraints { make in
make.height.greaterThanOrEqualTo(UIConstants.toolbarHeight)
make.height.equalTo(UIConstants.toolbarHeight).priority(.high)
make.edges.equalTo(alertStackView)
}

Expand Down
2 changes: 2 additions & 0 deletions Sources/Brave/Frontend/Browser/PageZoom/PageZoomView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ struct PageZoomView: View {
HStack(spacing: 0.0) {
Text(Strings.PageZoom.zoomViewText)
.font(.system(.subheadline))
.fixedSize(horizontal: false, vertical: true)
.frame(maxWidth: .infinity, alignment: .leading)
ZoomView(
isPrivateBrowsing: isPrivateBrowsing,
Expand All @@ -127,6 +128,7 @@ struct PageZoomView: View {
.padding(.vertical, 6.0)
}
.background(Color(UIColor.braveBackground))
.ignoresSafeArea()
}

private func increment() {
Expand Down