Various improvements

This commit is contained in:
Ilya Laktyushin
2022-05-28 20:17:46 +04:00
parent ea2d3dd553
commit c29cb46ef7
2 changed files with 12 additions and 6 deletions

View File

@@ -855,7 +855,7 @@ private final class DemoSheetContent: CombinedComponent {
transition: context.transition
)
var contentHeight: CGFloat = context.availableSize.width + 154.0
var contentHeight: CGFloat = context.availableSize.width + 146.0
if case .other = component.source {
contentHeight -= 40.0
}
@@ -865,7 +865,9 @@ private final class DemoSheetContent: CombinedComponent {
.position(CGPoint(x: buttonFrame.midX, y: buttonFrame.midY))
)
let contentSize = CGSize(width: context.availableSize.width, height: buttonFrame.maxY + 5.0 + environment.safeInsets.bottom)
let bottomPanelPadding: CGFloat = 12.0
let bottomInset: CGFloat = environment.safeInsets.bottom > 0.0 ? environment.safeInsets.bottom + 5.0 : bottomPanelPadding
let contentSize = CGSize(width: context.availableSize.width, height: buttonFrame.maxY + bottomInset)
return contentSize
}