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 {
|
private enum Constants {
|
||||||
static let iPadWidth: CGFloat = 350
|
static let iPadWidth: CGFloat = 350
|
||||||
static let compactHeightOffset: CGFloat = 120
|
static let compactHeightOffset: CGFloat = 120
|
||||||
static let fullScreenHeightFactorPortrait: CGFloat = 0.1
|
|
||||||
static let halfScreenHeightFactorPortrait: CGFloat = 0.55
|
static let halfScreenHeightFactorPortrait: CGFloat = 0.55
|
||||||
static let landscapeTopInset: CGFloat = 10
|
static let topInset: CGFloat = 8
|
||||||
}
|
}
|
||||||
|
|
||||||
var upper: ModalPresentationStep {
|
var upper: ModalPresentationStep {
|
||||||
@@ -73,7 +72,7 @@ extension ModalPresentationStep {
|
|||||||
if isPortraitOrientation {
|
if isPortraitOrientation {
|
||||||
switch self {
|
switch self {
|
||||||
case .fullScreen:
|
case .fullScreen:
|
||||||
frame.origin.y = containerSize.height * Constants.fullScreenHeightFactorPortrait
|
frame.origin.y = safeAreaInsets.top + Constants.topInset
|
||||||
case .halfScreen:
|
case .halfScreen:
|
||||||
frame.origin.y = containerSize.height * Constants.halfScreenHeightFactorPortrait
|
frame.origin.y = containerSize.height * Constants.halfScreenHeightFactorPortrait
|
||||||
case .compact:
|
case .compact:
|
||||||
@@ -86,7 +85,7 @@ extension ModalPresentationStep {
|
|||||||
frame.origin.x = safeAreaInsets.left
|
frame.origin.x = safeAreaInsets.left
|
||||||
switch self {
|
switch self {
|
||||||
case .fullScreen:
|
case .fullScreen:
|
||||||
frame.origin.y = Constants.landscapeTopInset
|
frame.origin.y = Constants.topInset
|
||||||
case .halfScreen, .compact:
|
case .halfScreen, .compact:
|
||||||
frame.origin.y = containerSize.height - Constants.compactHeightOffset
|
frame.origin.y = containerSize.height - Constants.compactHeightOffset
|
||||||
case .hidden:
|
case .hidden:
|
||||||
|
|||||||
Reference in New Issue
Block a user