mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-16 05:55:20 +00:00
Fix send button icon in white dark theme
This commit is contained in:
parent
9e9dbd49dc
commit
9f9ce2b850
@ -117,3 +117,17 @@ public extension NavigationControllerTheme {
|
||||
self.init(statusBar: navigationStatusBar, navigationBar: NavigationBarTheme(rootControllerTheme: presentationTheme), emptyAreaColor: presentationTheme.chatList.backgroundColor)
|
||||
}
|
||||
}
|
||||
|
||||
public extension PresentationThemeBubbleColorComponents {
|
||||
var hasSingleFillColor: Bool {
|
||||
if self.fill.count == 1 {
|
||||
return true
|
||||
}
|
||||
for i in 0 ..< self.fill.count - 1 {
|
||||
if self.fill[i].argb != self.fill[i + 1].argb {
|
||||
return false
|
||||
}
|
||||
}
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
@ -433,7 +433,7 @@ public struct PresentationResourcesChat {
|
||||
return generateImage(CGSize(width: 33.0, height: 33.0), rotatedContext: { size, context in
|
||||
context.clear(CGRect(origin: CGPoint(), size: size))
|
||||
let color: UIColor
|
||||
if [.day, .night].contains(theme.referenceTheme.baseTheme) && theme.chat.message.outgoing.bubble.withWallpaper.fill.count > 1 {
|
||||
if [.day, .night].contains(theme.referenceTheme.baseTheme) && !theme.chat.message.outgoing.bubble.withWallpaper.hasSingleFillColor {
|
||||
color = .white
|
||||
} else {
|
||||
color = theme.chat.inputPanel.actionControlForegroundColor
|
||||
@ -470,7 +470,7 @@ public struct PresentationResourcesChat {
|
||||
return generateImage(CGSize(width: 33.0, height: 33.0), rotatedContext: { size, context in
|
||||
context.clear(CGRect(origin: CGPoint(), size: size))
|
||||
let color: UIColor
|
||||
if [.day, .night].contains(theme.referenceTheme.baseTheme) && theme.chat.message.outgoing.bubble.withWallpaper.fill.count > 1 {
|
||||
if [.day, .night].contains(theme.referenceTheme.baseTheme) && !theme.chat.message.outgoing.bubble.withWallpaper.hasSingleFillColor {
|
||||
color = .white
|
||||
} else {
|
||||
color = theme.chat.inputPanel.actionControlForegroundColor
|
||||
@ -515,7 +515,7 @@ public struct PresentationResourcesChat {
|
||||
context.translateBy(x: -imageRect.midX, y: -imageRect.midY)
|
||||
|
||||
let color: UIColor
|
||||
if [.day, .night].contains(theme.referenceTheme.baseTheme) && theme.chat.message.outgoing.bubble.withWallpaper.fill.count > 1 {
|
||||
if [.day, .night].contains(theme.referenceTheme.baseTheme) && !theme.chat.message.outgoing.bubble.withWallpaper.hasSingleFillColor {
|
||||
color = .white
|
||||
} else {
|
||||
color = theme.chat.inputPanel.actionControlForegroundColor
|
||||
|
@ -42,6 +42,8 @@ final class ChatTextInputActionButtonsNode: ASDisplayNode {
|
||||
self.micButton = ChatTextInputMediaRecordingButton(theme: theme, strings: strings, presentController: presentController)
|
||||
|
||||
self.sendContainerNode = ASDisplayNode()
|
||||
self.sendContainerNode.layer.allowsGroupOpacity = true
|
||||
|
||||
self.backgroundNode = ASDisplayNode()
|
||||
self.backgroundNode.backgroundColor = theme.chat.inputPanel.actionControlFillColor
|
||||
self.backgroundNode.clipsToBounds = true
|
||||
@ -112,7 +114,7 @@ final class ChatTextInputActionButtonsNode: ASDisplayNode {
|
||||
|
||||
self.backgroundNode.backgroundColor = theme.chat.inputPanel.actionControlFillColor
|
||||
|
||||
if [.day, .night].contains(theme.referenceTheme.baseTheme) && theme.chat.message.outgoing.bubble.withWallpaper.fill.count > 1 {
|
||||
if [.day, .night].contains(theme.referenceTheme.baseTheme) && !theme.chat.message.outgoing.bubble.withWallpaper.hasSingleFillColor {
|
||||
self.backdropNode.isHidden = false
|
||||
} else {
|
||||
self.backdropNode.isHidden = true
|
||||
|
Loading…
x
Reference in New Issue
Block a user