Adjust blur

This commit is contained in:
Isaac 2023-11-27 19:20:22 +04:00
parent 92043f0241
commit c2c042ea48
2 changed files with 3 additions and 2 deletions

View File

@ -600,7 +600,8 @@ public final class PeerAvatarBottomShadowNode: ASDisplayNode {
return UIColor(white: 1.0, alpha: 1.0).cgColor
} else {
let step: CGFloat = CGFloat(i - firstStep) / CGFloat(numSteps - firstStep - 1)
return UIColor(white: 1.0, alpha: baseGradientAlpha * (1.0 - pow(step, 3.0))).cgColor
let value: CGFloat = 1.0 - bezierPoint(0.42, 0.0, 0.58, 1.0, step)
return UIColor(white: 1.0, alpha: baseGradientAlpha * value).cgColor
}
}
self.backgroundGradientMaskLayer.locations = (0 ..< numSteps).map { i -> NSNumber in

View File

@ -1106,7 +1106,7 @@ final class PeerInfoHeaderNode: ASDisplayNode {
var bottomShadowHeight: CGFloat = 88.0
if !self.isSettings {
bottomShadowHeight += 90.0
bottomShadowHeight += 110.0
}
let bottomShadowFrame = CGRect(origin: CGPoint(x: 0.0, y: expandedAvatarHeight - bottomShadowHeight), size: CGSize(width: width, height: bottomShadowHeight))
transition.updateFrame(node: self.avatarListNode.listContainerNode.bottomShadowNode, frame: bottomShadowFrame, beginWithCurrentState: true)