mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-10-09 03:20:48 +00:00
Various theme fixes
This commit is contained in:
parent
d8f6f1fed0
commit
e050657c15
@ -219,13 +219,13 @@ public func customizeDefaultDayTheme(theme: PresentationTheme, specialMode: Bool
|
||||
let hueFactor: CGFloat = 0.75
|
||||
let saturationFactor: CGFloat = 1.1
|
||||
outgoingPrimaryTextColor = UIColor(rgb: 0x000000)
|
||||
outgoingSecondaryTextColor = outgoingBubbleFillColors?.first?.withMultiplied(hue: 1.344 * hueFactor, saturation: 4.554 * saturationFactor, brightness: 0.549).withAlphaComponent(0.8)
|
||||
|
||||
if let outgoingAccent = outgoingAccent {
|
||||
outgoingSecondaryTextColor = outgoingAccent
|
||||
outgoingAccentTextColor = outgoingAccent
|
||||
outgoingLinkTextColor = outgoingAccent
|
||||
outgoingScamColor = UIColor(rgb: 0xff3b30)
|
||||
outgoingControlColor = outgoingAccent.withMultiplied(hue: 0.983, saturation: 0.7, brightness: 1.169)
|
||||
outgoingControlColor = outgoingAccent
|
||||
outgoingInactiveControlColor = outgoingAccent
|
||||
outgoingFileTitleColor = outgoingAccent
|
||||
outgoingPollsProgressColor = outgoingControlColor
|
||||
@ -234,7 +234,7 @@ public func customizeDefaultDayTheme(theme: PresentationTheme, specialMode: Bool
|
||||
outgoingCheckColor = outgoingAccent
|
||||
} else {
|
||||
let outgoingBubbleMixedColor = lightnessColor
|
||||
|
||||
outgoingSecondaryTextColor = outgoingBubbleFillColors?.first?.withMultiplied(hue: 1.344 * hueFactor, saturation: 4.554 * saturationFactor, brightness: 0.549).withAlphaComponent(0.8)
|
||||
outgoingAccentTextColor = outgoingBubbleMixedColor.withMultiplied(hue: 1.302 * hueFactor, saturation: 4.554 * saturationFactor, brightness: 0.655)
|
||||
outgoingLinkTextColor = UIColor(rgb: 0x004bad)
|
||||
outgoingScamColor = UIColor(rgb: 0xff3b30)
|
||||
|
@ -101,25 +101,25 @@ public struct PresentationResourcesChat {
|
||||
|
||||
public static func chatBubbleVerticalLineIncomingImage(_ theme: PresentationTheme) -> UIImage? {
|
||||
return theme.image(PresentationResourceKey.chatBubbleVerticalLineIncomingImage.rawValue, { theme in
|
||||
return generateLineImage(color: theme.chat.message.incoming.accentControlColor)
|
||||
return generateLineImage(color: theme.chat.message.incoming.accentTextColor)
|
||||
})
|
||||
}
|
||||
|
||||
public static func chatBubbleVerticalLineOutgoingImage(_ theme: PresentationTheme) -> UIImage? {
|
||||
return theme.image(PresentationResourceKey.chatBubbleVerticalLineOutgoingImage.rawValue, { theme in
|
||||
return generateLineImage(color: theme.chat.message.outgoing.accentControlColor)
|
||||
return generateLineImage(color: theme.chat.message.outgoing.accentTextColor)
|
||||
})
|
||||
}
|
||||
|
||||
public static func chatBubbleConsumableContentIncomingIcon(_ theme: PresentationTheme) -> UIImage? {
|
||||
return theme.image(PresentationResourceKey.chatBubbleConsumableContentIncomingIcon.rawValue, { theme in
|
||||
return generateFilledCircleImage(diameter: 4.0, color: theme.chat.message.incoming.accentControlColor)
|
||||
return generateFilledCircleImage(diameter: 4.0, color: theme.chat.message.incoming.accentTextColor)
|
||||
})
|
||||
}
|
||||
|
||||
public static func chatBubbleConsumableContentOutgoingIcon(_ theme: PresentationTheme) -> UIImage? {
|
||||
return theme.image(PresentationResourceKey.chatBubbleConsumableContentOutgoingIcon.rawValue, { theme in
|
||||
return generateFilledCircleImage(diameter: 4.0, color: theme.chat.message.outgoing.accentControlColor)
|
||||
return generateFilledCircleImage(diameter: 4.0, color: theme.chat.message.outgoing.accentTextColor)
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -316,7 +316,6 @@ final class EditAccessoryPanelNode: AccessoryPanelNode {
|
||||
self.theme = theme
|
||||
|
||||
self.closeButton.setImage(PresentationResourcesChat.chatInputPanelCloseIconImage(theme), for: [])
|
||||
|
||||
self.lineNode.image = PresentationResourcesChat.chatInputPanelVerticalSeparatorLineImage(theme)
|
||||
self.iconNode.image = PresentationResourcesChat.chatInputPanelEditIconImage(theme)
|
||||
|
||||
|
@ -258,15 +258,14 @@ final class ForwardAccessoryPanelNode: AccessoryPanelNode {
|
||||
|
||||
func updateThemeAndStrings(theme: PresentationTheme, strings: PresentationStrings, forwardOptionsState: ChatInterfaceForwardOptionsState?, force: Bool = false) {
|
||||
if force || self.theme !== theme || self.strings !== strings || self.forwardOptionsState != forwardOptionsState {
|
||||
let previousTheme = self.theme
|
||||
self.theme = theme
|
||||
self.strings = strings
|
||||
self.forwardOptionsState = forwardOptionsState
|
||||
|
||||
if self.theme !== theme {
|
||||
self.closeButton.setImage(PresentationResourcesChat.chatInputPanelCloseIconImage(theme), for: [])
|
||||
self.lineNode.image = PresentationResourcesChat.chatInputPanelVerticalSeparatorLineImage(theme)
|
||||
self.iconNode.image = PresentationResourcesChat.chatInputPanelForwardIconImage(theme)
|
||||
}
|
||||
self.closeButton.setImage(PresentationResourcesChat.chatInputPanelCloseIconImage(theme), for: [])
|
||||
self.lineNode.image = PresentationResourcesChat.chatInputPanelVerticalSeparatorLineImage(theme)
|
||||
self.iconNode.image = PresentationResourcesChat.chatInputPanelForwardIconImage(theme)
|
||||
|
||||
let filteredMessages = self.messages
|
||||
|
||||
@ -278,7 +277,7 @@ final class ForwardAccessoryPanelNode: AccessoryPanelNode {
|
||||
text = "\(self.authors ?? ""): \(string)"
|
||||
} else {
|
||||
title = self.strings.Conversation_ForwardOptions_ForwardTitle(Int32(filteredMessages.count))
|
||||
text = "From \(self.authors ?? "")"
|
||||
text = self.strings.Conversation_ForwardFrom(self.authors ?? "").string
|
||||
}
|
||||
|
||||
self.titleNode.attributedText = NSAttributedString(string: title, font: Font.medium(15.0), textColor: self.theme.chat.inputPanel.panelControlAccentColor)
|
||||
|
Loading…
x
Reference in New Issue
Block a user