Various fixes

This commit is contained in:
Ilya Laktyushin
2024-01-15 18:43:49 +04:00
parent 7d95c0a512
commit ccf6956beb
4 changed files with 46 additions and 24 deletions

View File

@@ -145,7 +145,10 @@ public final class MoreButtonNode: ASDisplayNode {
override public func calculateSizeThatFits(_ constrainedSize: CGSize) -> CGSize {
let animationSize = CGSize(width: 30.0, height: 30.0)
let inset: CGFloat = 0.0
self.iconNode.frame = CGRect(origin: CGPoint(x: inset + 6.0, y: floor((constrainedSize.height - animationSize.height) / 2.0) + 1.0), size: animationSize)
let iconFrame = CGRect(origin: CGPoint(x: inset + 6.0, y: floor((constrainedSize.height - animationSize.height) / 2.0) + 1.0), size: animationSize)
self.iconNode.position = iconFrame.center
self.iconNode.bounds = CGRect(origin: .zero, size: iconFrame.size)
let size = CGSize(width: animationSize.width + inset * 2.0, height: constrainedSize.height)
let bounds = CGRect(origin: CGPoint(), size: size)