mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 22:25:57 +00:00
Video call screen improvements
This commit is contained in:
@@ -91,6 +91,8 @@ final class CallControllerButtonItemNode: HighlightTrackingButtonNode {
|
||||
func update(size: CGSize, content: Content, text: String, transition: ContainedViewLayoutTransition) {
|
||||
let scaleFactor = size.width / self.largeButtonSize
|
||||
|
||||
let isSmall = self.largeButtonSize > size.width
|
||||
|
||||
self.effectView.frame = CGRect(origin: CGPoint(), size: CGSize(width: self.largeButtonSize, height: self.largeButtonSize))
|
||||
self.contentNode.frame = CGRect(origin: CGPoint(), size: CGSize(width: self.largeButtonSize, height: self.largeButtonSize))
|
||||
self.overlayHighlightNode.frame = CGRect(origin: CGPoint(), size: CGSize(width: self.largeButtonSize, height: self.largeButtonSize))
|
||||
@@ -208,7 +210,7 @@ final class CallControllerButtonItemNode: HighlightTrackingButtonNode {
|
||||
self.textNode.attributedText = NSAttributedString(string: text, font: labelFont, textColor: .white)
|
||||
}
|
||||
let textSize = self.textNode.updateLayout(CGSize(width: 150.0, height: 100.0))
|
||||
let textFrame = CGRect(origin: CGPoint(x: floor((size.width - textSize.width) / 2.0), y: size.height + 5.0), size: textSize)
|
||||
let textFrame = CGRect(origin: CGPoint(x: floor((size.width - textSize.width) / 2.0), y: size.height + (isSmall ? 5.0 : 8.0)), size: textSize)
|
||||
if self.currentText.isEmpty {
|
||||
self.textNode.frame = textFrame
|
||||
if transition.isAnimated {
|
||||
|
||||
Reference in New Issue
Block a user