From b97295d6b2d0d0d5520bcb3aded3d079b7582a08 Mon Sep 17 00:00:00 2001 From: Ilya Laktyushin Date: Wed, 6 May 2020 16:25:51 +0400 Subject: [PATCH] Fix passcode entry title label layout --- submodules/PasscodeUI/Sources/PasscodeEntryLabelNode.swift | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/submodules/PasscodeUI/Sources/PasscodeEntryLabelNode.swift b/submodules/PasscodeUI/Sources/PasscodeEntryLabelNode.swift index b77b0f829a..51db01bf6e 100644 --- a/submodules/PasscodeUI/Sources/PasscodeEntryLabelNode.swift +++ b/submodules/PasscodeUI/Sources/PasscodeEntryLabelNode.swift @@ -21,6 +21,7 @@ final class PasscodeEntryLabelNode: ASDisplayNode { self.textNode = ASTextNode() self.textNode.isLayerBacked = false + self.textNode.textAlignment = .center super.init() @@ -84,6 +85,6 @@ final class PasscodeEntryLabelNode: ASDisplayNode { transition.updateFrame(node: self.wrapperNode, frame: textFrame) transition.updateFrame(node: self.textNode, frame: CGRect(origin: CGPoint(), size: textSize)) - return CGSize(width: size.width, height: 25.0) + return CGSize(width: size.width, height: max(25.0, textSize.height)) } }