mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-16 05:55:20 +00:00
Various Fixes
This commit is contained in:
parent
ba15eaed5c
commit
362e43a2d2
@ -504,15 +504,17 @@ private final class AuthTransferScanScreenNode: ViewControllerTracingNode, UIScr
|
||||
let titleSize = self.titleNode.updateLayout(CGSize(width: layout.size.width - 16.0, height: layout.size.height))
|
||||
let textSize = self.textNode.updateLayout(CGSize(width: layout.size.width - 16.0, height: layout.size.height))
|
||||
let errorTextSize = self.errorTextNode.updateLayout(CGSize(width: layout.size.width - 16.0, height: layout.size.height))
|
||||
let textFrame = CGRect(origin: CGPoint(x: floor((layout.size.width - textSize.width) / 2.0), y: min(dimHeight - textSize.height - titleSpacing, navigationHeight + floorToScreenPixels((dimHeight - navigationHeight - textSize.height) / 2.0) + 5.0)), size: textSize)
|
||||
var textFrame = CGRect(origin: CGPoint(x: floor((layout.size.width - textSize.width) / 2.0), y: max(dimHeight - textSize.height - titleSpacing, navigationHeight + floorToScreenPixels((dimHeight - navigationHeight - textSize.height) / 2.0) + 5.0)), size: textSize)
|
||||
let titleFrame = CGRect(origin: CGPoint(x: floor((layout.size.width - titleSize.width) / 2.0), y: textFrame.minY - 18.0 - titleSize.height), size: titleSize)
|
||||
var errorTextFrame = CGRect(origin: CGPoint(x: floor((layout.size.width - errorTextSize.width) / 2.0), y: dimHeight + frameSide + 48.0), size: errorTextSize)
|
||||
errorTextFrame.origin.y += floor(additionalTorchOffset / 2.0)
|
||||
if titleFrame.minY < navigationHeight {
|
||||
transition.updateAlpha(node: self.titleNode, alpha: 0.0)
|
||||
textFrame = textFrame.offsetBy(dx: 0.0, dy: -5.0)
|
||||
} else {
|
||||
transition.updateAlpha(node: self.titleNode, alpha: controlsAlpha)
|
||||
}
|
||||
var errorTextFrame = CGRect(origin: CGPoint(x: floor((layout.size.width - errorTextSize.width) / 2.0), y: dimHeight + frameSide + 48.0), size: errorTextSize)
|
||||
errorTextFrame.origin.y += floor(additionalTorchOffset / 2.0)
|
||||
|
||||
transition.updateFrameAdditive(node: self.titleNode, frame: titleFrame)
|
||||
transition.updateFrameAdditive(node: self.textNode, frame: textFrame)
|
||||
transition.updateFrameAdditive(node: self.errorTextNode, frame: errorTextFrame)
|
||||
|
@ -89,4 +89,14 @@ final class ChatTextInputMenu {
|
||||
self.state = .general
|
||||
}
|
||||
}
|
||||
|
||||
func hide() {
|
||||
self.back()
|
||||
if #available(iOS 13.0, *) {
|
||||
UIMenuController.shared.hideMenu()
|
||||
} else {
|
||||
UIMenuController.shared.isMenuVisible = false
|
||||
}
|
||||
UIMenuController.shared.update()
|
||||
}
|
||||
}
|
||||
|
@ -2048,8 +2048,7 @@ class ChatTextInputPanelNode: ChatInputPanelNode, ASEditableTextNodeDelegate {
|
||||
|
||||
if let textInputNode = self.textInputNode, let presentationInterfaceState = self.presentationInterfaceState {
|
||||
if case .format = self.inputMenu.state {
|
||||
self.inputMenu.deactivate()
|
||||
UIMenuController.shared.update()
|
||||
self.inputMenu.hide()
|
||||
}
|
||||
|
||||
let baseFontSize = max(minInputFontSize, presentationInterfaceState.fontSize.baseDisplaySize)
|
||||
|
@ -829,8 +829,7 @@ class PeerSelectionTextInputPanelNode: ChatInputPanelNode, TGCaptionPanelView, A
|
||||
|
||||
if let textInputNode = self.textInputNode, let presentationInterfaceState = self.presentationInterfaceState {
|
||||
if case .format = self.inputMenu.state {
|
||||
self.inputMenu.deactivate()
|
||||
UIMenuController.shared.update()
|
||||
self.inputMenu.hide()
|
||||
}
|
||||
|
||||
let baseFontSize = max(minInputFontSize, presentationInterfaceState.fontSize.baseDisplaySize)
|
||||
|
Loading…
x
Reference in New Issue
Block a user