mirror of
https://codeberg.org/comaps/comaps
synced 2025-12-19 13:03:36 +00:00
[ios] increase search screen top inset from the safe area
Signed-off-by: Kiryl Kaveryn <kirylkaveryn@gmail.com>
This commit is contained in:
committed by
Konstantin Pastbin
parent
79a5ba5609
commit
6a488a08a0
@@ -9,9 +9,8 @@ extension ModalPresentationStep {
|
||||
private enum Constants {
|
||||
static let iPadWidth: CGFloat = 350
|
||||
static let compactHeightOffset: CGFloat = 120
|
||||
static let fullScreenHeightFactorPortrait: CGFloat = 0.1
|
||||
static let halfScreenHeightFactorPortrait: CGFloat = 0.55
|
||||
static let landscapeTopInset: CGFloat = 10
|
||||
static let topInset: CGFloat = 8
|
||||
}
|
||||
|
||||
var upper: ModalPresentationStep {
|
||||
@@ -73,7 +72,7 @@ extension ModalPresentationStep {
|
||||
if isPortraitOrientation {
|
||||
switch self {
|
||||
case .fullScreen:
|
||||
frame.origin.y = containerSize.height * Constants.fullScreenHeightFactorPortrait
|
||||
frame.origin.y = safeAreaInsets.top + Constants.topInset
|
||||
case .halfScreen:
|
||||
frame.origin.y = containerSize.height * Constants.halfScreenHeightFactorPortrait
|
||||
case .compact:
|
||||
@@ -86,7 +85,7 @@ extension ModalPresentationStep {
|
||||
frame.origin.x = safeAreaInsets.left
|
||||
switch self {
|
||||
case .fullScreen:
|
||||
frame.origin.y = Constants.landscapeTopInset
|
||||
frame.origin.y = Constants.topInset
|
||||
case .halfScreen, .compact:
|
||||
frame.origin.y = containerSize.height - Constants.compactHeightOffset
|
||||
case .hidden:
|
||||
|
||||
Reference in New Issue
Block a user