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

Ref #3838: Fix overall menu height on smaller devices #3850

Merged
merged 1 commit into from
Jun 25, 2021
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
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
"package": "PanModal",
"repositoryURL": "https://github.com/brave/PanModal",
"state": {
"branch": "master",
"branch": null,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this ok?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I kept seeing it pop up so I let it through. Its Xcode fixing up its own mistake, it should have null'd out the branch when I changed it to a commit, but it didnt for some reason

"revision": "e4c07f8e6c5df937051fabc47e1e92901e1d068b",
"version": null
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -215,11 +215,15 @@ extension MenuViewController: PanModalPresentable {
topVC.view.layoutIfNeeded()
return _scrollViewChild(in: topVC.view)
}
var topOffset: CGFloat {
let topInset = view.window?.safeAreaInsets.top ?? 0
return topInset + 32
}
var longFormHeight: PanModalHeight {
.maxHeightWithTopInset(32)
.maxHeight
}
var shortFormHeight: PanModalHeight {
isPresentingInnerMenu ? .maxHeightWithTopInset(32) : .contentHeight(initialHeight)
isPresentingInnerMenu ? .maxHeight : .contentHeight(initialHeight)
}
var allowsExtendedPanScrolling: Bool {
true
Expand Down