iPad trackpad and key shortcuts improvements

This commit is contained in:
Ilya Laktyushin
2022-07-30 03:51:46 +03:00
parent 6c4a730b42
commit 5b8961d02a
46 changed files with 1035 additions and 83 deletions

View File

@@ -25,6 +25,8 @@ final class AttachmentTextInputActionButtonsNode: ASDisplayNode {
self.gestureRecognizer?.isEnabled = self.sendButtonLongPressEnabled
}
}
private var sendButtonPointerInteraction: PointerInteraction?
private var validLayout: CGSize?
@@ -39,7 +41,7 @@ final class AttachmentTextInputActionButtonsNode: ASDisplayNode {
self.backgroundNode = ASDisplayNode()
self.backgroundNode.backgroundColor = theme.chat.inputPanel.actionControlFillColor
self.backgroundNode.clipsToBounds = true
self.sendButton = HighlightTrackingButtonNode(pointerStyle: .lift)
self.sendButton = HighlightTrackingButtonNode(pointerStyle: nil)
self.textNode = ImmediateTextNode()
self.textNode.attributedText = NSAttributedString(string: self.strings.MediaPicker_Send, font: Font.semibold(17.0), textColor: theme.chat.inputPanel.actionControlForegroundColor)
@@ -90,6 +92,8 @@ final class AttachmentTextInputActionButtonsNode: ASDisplayNode {
strongSelf.sendButtonLongPressed?(strongSelf.sendContainerNode, recognizer)
}
}
self.sendButtonPointerInteraction = PointerInteraction(view: self.sendButton.view, customInteractionView: self.backgroundNode.view, style: .lift)
}
func updateTheme(theme: PresentationTheme, wallpaper: TelegramWallpaper) {