mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 14:20:20 +00:00
Various improvements
This commit is contained in:
@@ -194,16 +194,14 @@ private final class SheetContent: CombinedComponent {
|
||||
contentSize.height += list.size.height
|
||||
contentSize.height += spacing
|
||||
|
||||
let buttonHeight: CGFloat = 50.0
|
||||
let bottomPanelPadding: CGFloat = 12.0
|
||||
let bottomInset: CGFloat = environment.safeInsets.bottom > 0.0 ? environment.safeInsets.bottom + 5.0 : bottomPanelPadding
|
||||
|
||||
contentSize.height += bottomPanelPadding
|
||||
|
||||
let buttonHeight: CGFloat = 52.0
|
||||
let buttonInsets = ContainerViewLayout.concentricInsets(bottomInset: environment.safeInsets.bottom, innerDiameter: 52.0, sideInset: 30.0)
|
||||
|
||||
let controller = environment.controller() as? StarsIntroScreen
|
||||
let actionButton = actionButton.update(
|
||||
component: ButtonComponent(
|
||||
background: ButtonComponent.Background(
|
||||
style: .glass,
|
||||
color: environment.theme.list.itemCheckColors.fillColor,
|
||||
foreground: environment.theme.list.itemCheckColors.foregroundColor,
|
||||
pressedColor: environment.theme.list.itemCheckColors.fillColor.withMultipliedAlpha(0.8)
|
||||
@@ -217,14 +215,14 @@ private final class SheetContent: CombinedComponent {
|
||||
controller?.dismissAnimated()
|
||||
}
|
||||
),
|
||||
availableSize: CGSize(width: context.availableSize.width - sideInset * 2.0, height: buttonHeight),
|
||||
availableSize: CGSize(width: context.availableSize.width - buttonInsets.left - buttonInsets.right, height: buttonHeight),
|
||||
transition: context.transition
|
||||
)
|
||||
context.add(actionButton
|
||||
.position(CGPoint(x: context.availableSize.width / 2.0, y: contentSize.height + actionButton.size.height / 2.0))
|
||||
.cornerRadius(10.0)
|
||||
)
|
||||
contentSize.height += actionButton.size.height + bottomInset
|
||||
contentSize.height += actionButton.size.height
|
||||
contentSize.height += buttonInsets.bottom
|
||||
|
||||
return contentSize
|
||||
}
|
||||
@@ -279,6 +277,7 @@ private final class ContainerComponent: CombinedComponent {
|
||||
controller()?.dismiss()
|
||||
}
|
||||
)),
|
||||
style: .glass,
|
||||
backgroundColor: .color(environment.theme.actionSheet.opaqueItemBackgroundColor),
|
||||
followContentSizeChanges: true,
|
||||
clipsContent: true,
|
||||
|
||||
Reference in New Issue
Block a user