Various UI fixes

This commit is contained in:
Ilya Laktyushin
2019-08-23 06:55:33 +03:00
parent e3a669f489
commit cfb5d2027a
84 changed files with 860 additions and 806 deletions

View File

@@ -13,13 +13,15 @@ final class ShareInputFieldNodeTheme: Equatable {
let textColor: UIColor
let placeholderColor: UIColor
let clearButtonColor: UIColor
let accentColor: UIColor
let keyboard: PresentationThemeKeyboardColor
public init(backgroundColor: UIColor, textColor: UIColor, placeholderColor: UIColor, clearButtonColor: UIColor, keyboard: PresentationThemeKeyboardColor) {
public init(backgroundColor: UIColor, textColor: UIColor, placeholderColor: UIColor, clearButtonColor: UIColor, accentColor: UIColor, keyboard: PresentationThemeKeyboardColor) {
self.backgroundColor = backgroundColor
self.textColor = textColor
self.placeholderColor = placeholderColor
self.clearButtonColor = clearButtonColor
self.accentColor = accentColor
self.keyboard = keyboard
}
@@ -36,6 +38,9 @@ final class ShareInputFieldNodeTheme: Equatable {
if lhs.clearButtonColor != rhs.clearButtonColor {
return false
}
if lhs.accentColor != rhs.accentColor {
return false
}
if lhs.keyboard != rhs.keyboard {
return false
}
@@ -45,7 +50,7 @@ final class ShareInputFieldNodeTheme: Equatable {
extension ShareInputFieldNodeTheme {
convenience init(presentationTheme theme: PresentationTheme) {
self.init(backgroundColor: theme.actionSheet.inputBackgroundColor, textColor: theme.actionSheet.inputTextColor, placeholderColor: theme.actionSheet.inputPlaceholderColor, clearButtonColor: theme.actionSheet.inputClearButtonColor, keyboard: theme.chatList.searchBarKeyboardColor)
self.init(backgroundColor: theme.actionSheet.inputBackgroundColor, textColor: theme.actionSheet.inputTextColor, placeholderColor: theme.actionSheet.inputPlaceholderColor, clearButtonColor: theme.actionSheet.inputClearButtonColor, accentColor: theme.actionSheet.controlAccentColor, keyboard: theme.chatList.searchBarKeyboardColor)
}
}
@@ -95,6 +100,7 @@ final class ShareInputFieldNode: ASDisplayNode, ASEditableTextNodeDelegate {
self.textInputNode.hitTestSlop = UIEdgeInsets(top: -5.0, left: -5.0, bottom: -5.0, right: -5.0)
self.textInputNode.textContainerInset = UIEdgeInsets(top: self.inputInsets.top, left: 0.0, bottom: self.inputInsets.bottom, right: 0.0)
self.textInputNode.keyboardAppearance = theme.keyboard.keyboardAppearance
self.textInputNode.tintColor = theme.accentColor
self.placeholderNode = ASTextNode()
self.placeholderNode.isUserInteractionEnabled = false