Small fixes

This commit is contained in:
Ali
2020-04-16 17:03:50 +04:00
parent 5d638ce4d2
commit eed8cb0b3f
3 changed files with 21 additions and 2 deletions

View File

@@ -205,7 +205,8 @@ private final class TooltipScreenNode: ViewControllerTracingNode {
}
self.isArrowInverted = invertArrow
case .top:
backgroundFrame = CGRect(origin: CGPoint(x: sideInset, y: layout.insets(options: [.statusBar]).top + 13.0), size: CGSize(width: layout.size.width - sideInset * 2.0, height: backgroundHeight))
let backgroundWidth = containerWidth
backgroundFrame = CGRect(origin: CGPoint(x: floor((layout.size.width - backgroundWidth) / 2.0), y: layout.insets(options: [.statusBar]).top + 13.0), size: CGSize(width: backgroundWidth, height: backgroundHeight))
}
transition.updateFrame(node: self.containerNode, frame: backgroundFrame)