mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-16 05:55:20 +00:00
Merge commit '667aec4df01e39fbe184a30e3ed92408c45a6fd2' into beta
This commit is contained in:
commit
c315e84d5e
@ -117,3 +117,17 @@ public extension NavigationControllerTheme {
|
|||||||
self.init(statusBar: navigationStatusBar, navigationBar: NavigationBarTheme(rootControllerTheme: presentationTheme), emptyAreaColor: presentationTheme.chatList.backgroundColor)
|
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
|
return generateImage(CGSize(width: 33.0, height: 33.0), rotatedContext: { size, context in
|
||||||
context.clear(CGRect(origin: CGPoint(), size: size))
|
context.clear(CGRect(origin: CGPoint(), size: size))
|
||||||
let color: UIColor
|
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
|
color = .white
|
||||||
} else {
|
} else {
|
||||||
color = theme.chat.inputPanel.actionControlForegroundColor
|
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
|
return generateImage(CGSize(width: 33.0, height: 33.0), rotatedContext: { size, context in
|
||||||
context.clear(CGRect(origin: CGPoint(), size: size))
|
context.clear(CGRect(origin: CGPoint(), size: size))
|
||||||
let color: UIColor
|
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
|
color = .white
|
||||||
} else {
|
} else {
|
||||||
color = theme.chat.inputPanel.actionControlForegroundColor
|
color = theme.chat.inputPanel.actionControlForegroundColor
|
||||||
@ -515,7 +515,7 @@ public struct PresentationResourcesChat {
|
|||||||
context.translateBy(x: -imageRect.midX, y: -imageRect.midY)
|
context.translateBy(x: -imageRect.midX, y: -imageRect.midY)
|
||||||
|
|
||||||
let color: UIColor
|
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
|
color = .white
|
||||||
} else {
|
} else {
|
||||||
color = theme.chat.inputPanel.actionControlForegroundColor
|
color = theme.chat.inputPanel.actionControlForegroundColor
|
||||||
|
@ -42,6 +42,8 @@ final class ChatTextInputActionButtonsNode: ASDisplayNode {
|
|||||||
self.micButton = ChatTextInputMediaRecordingButton(theme: theme, strings: strings, presentController: presentController)
|
self.micButton = ChatTextInputMediaRecordingButton(theme: theme, strings: strings, presentController: presentController)
|
||||||
|
|
||||||
self.sendContainerNode = ASDisplayNode()
|
self.sendContainerNode = ASDisplayNode()
|
||||||
|
self.sendContainerNode.layer.allowsGroupOpacity = true
|
||||||
|
|
||||||
self.backgroundNode = ASDisplayNode()
|
self.backgroundNode = ASDisplayNode()
|
||||||
self.backgroundNode.backgroundColor = theme.chat.inputPanel.actionControlFillColor
|
self.backgroundNode.backgroundColor = theme.chat.inputPanel.actionControlFillColor
|
||||||
self.backgroundNode.clipsToBounds = true
|
self.backgroundNode.clipsToBounds = true
|
||||||
@ -112,7 +114,7 @@ final class ChatTextInputActionButtonsNode: ASDisplayNode {
|
|||||||
|
|
||||||
self.backgroundNode.backgroundColor = theme.chat.inputPanel.actionControlFillColor
|
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
|
self.backdropNode.isHidden = false
|
||||||
} else {
|
} else {
|
||||||
self.backdropNode.isHidden = true
|
self.backdropNode.isHidden = true
|
||||||
|
Loading…
x
Reference in New Issue
Block a user