Various fixes

This commit is contained in:
Ilya Laktyushin
2022-04-14 03:20:29 +04:00
parent 97392afb9e
commit df2354e9bb
12 changed files with 93 additions and 79 deletions

View File

@@ -167,12 +167,7 @@ final class InstantPageNavigationBar: ASDisplayNode {
}
func updateLayout(size: CGSize, minHeight: CGFloat, maxHeight: CGFloat, topInset: CGFloat, leftInset: CGFloat, rightInset: CGFloat, title: String?, pageProgress: CGFloat, transition: ContainedViewLayoutTransition) {
let progressHeight: CGFloat
if !topInset.isZero {
progressHeight = size.height - topInset + 11.0 - UIScreenPixel
} else {
progressHeight = size.height
}
let progressHeight = size.height
transition.updateFrame(node: self.pageProgressNode, frame: CGRect(origin: CGPoint(x: 0.0, y: size.height - progressHeight), size: CGSize(width: floorToScreenPixels(size.width * pageProgress), height: progressHeight)))
let transitionFactor = (size.height - minHeight) / (maxHeight - minHeight)