mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-11-07 09:20:08 +00:00
Adjust color
This commit is contained in:
parent
11636cd93d
commit
9222323b8a
@ -512,11 +512,11 @@ final class PeerInfoHeaderNode: ASDisplayNode {
|
|||||||
|
|
||||||
let regularContentButtonBackgroundColor: UIColor
|
let regularContentButtonBackgroundColor: UIColor
|
||||||
let collapsedHeaderContentButtonBackgroundColor = presentationData.theme.list.itemBlocksBackgroundColor
|
let collapsedHeaderContentButtonBackgroundColor = presentationData.theme.list.itemBlocksBackgroundColor
|
||||||
let expandedAvatarContentButtonBackgroundColor: UIColor = UIColor(white: 1.0, alpha: 0.3)
|
let expandedAvatarContentButtonBackgroundColor: UIColor = UIColor(white: 0.0, alpha: 0.1)
|
||||||
|
|
||||||
let regularHeaderButtonBackgroundColor: UIColor
|
let regularHeaderButtonBackgroundColor: UIColor
|
||||||
let collapsedHeaderButtonBackgroundColor: UIColor = .clear
|
let collapsedHeaderButtonBackgroundColor: UIColor = .clear
|
||||||
let expandedAvatarHeaderButtonBackgroundColor: UIColor = UIColor(white: 1.0, alpha: 0.3)
|
let expandedAvatarHeaderButtonBackgroundColor: UIColor = UIColor(white: 0.0, alpha: 0.1)
|
||||||
|
|
||||||
let regularContentButtonForegroundColor: UIColor = peer?.profileColor != nil ? UIColor.white : presentationData.theme.list.itemAccentColor
|
let regularContentButtonForegroundColor: UIColor = peer?.profileColor != nil ? UIColor.white : presentationData.theme.list.itemAccentColor
|
||||||
let collapsedHeaderContentButtonForegroundColor = presentationData.theme.list.itemAccentColor
|
let collapsedHeaderContentButtonForegroundColor = presentationData.theme.list.itemAccentColor
|
||||||
@ -847,6 +847,8 @@ final class PeerInfoHeaderNode: ASDisplayNode {
|
|||||||
isFake = peer.isFake || peer.isScam
|
isFake = peer.isFake || peer.isScam
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let titleShadowColor = UIColor(white: 0.0, alpha: 0.1)
|
||||||
|
|
||||||
if let peer = peer {
|
if let peer = peer {
|
||||||
var title: String
|
var title: String
|
||||||
if peer.id == self.context.account.peerId && !self.isSettings {
|
if peer.id == self.context.account.peerId && !self.isSettings {
|
||||||
@ -871,7 +873,7 @@ final class PeerInfoHeaderNode: ASDisplayNode {
|
|||||||
|
|
||||||
titleStringText = title
|
titleStringText = title
|
||||||
titleAttributes = MultiScaleTextState.Attributes(font: Font.medium(28.0), color: .white)
|
titleAttributes = MultiScaleTextState.Attributes(font: Font.medium(28.0), color: .white)
|
||||||
smallTitleAttributes = MultiScaleTextState.Attributes(font: Font.medium(28.0), color: .white)
|
smallTitleAttributes = MultiScaleTextState.Attributes(font: Font.medium(28.0), color: .white, shadowColor: titleShadowColor)
|
||||||
|
|
||||||
if self.isSettings, let user = peer as? TelegramUser {
|
if self.isSettings, let user = peer as? TelegramUser {
|
||||||
var subtitle = formatPhoneNumber(context: self.context, number: user.phone ?? "")
|
var subtitle = formatPhoneNumber(context: self.context, number: user.phone ?? "")
|
||||||
@ -881,7 +883,7 @@ final class PeerInfoHeaderNode: ASDisplayNode {
|
|||||||
}
|
}
|
||||||
subtitleStringText = subtitle
|
subtitleStringText = subtitle
|
||||||
subtitleAttributes = MultiScaleTextState.Attributes(font: Font.regular(17.0), color: .white)
|
subtitleAttributes = MultiScaleTextState.Attributes(font: Font.regular(17.0), color: .white)
|
||||||
smallSubtitleAttributes = MultiScaleTextState.Attributes(font: Font.regular(16.0), color: .white)
|
smallSubtitleAttributes = MultiScaleTextState.Attributes(font: Font.regular(16.0), color: .white, shadowColor: titleShadowColor)
|
||||||
|
|
||||||
usernameString = ("", MultiScaleTextState.Attributes(font: Font.regular(16.0), color: .white))
|
usernameString = ("", MultiScaleTextState.Attributes(font: Font.regular(16.0), color: .white))
|
||||||
} else if let _ = threadData {
|
} else if let _ = threadData {
|
||||||
@ -893,7 +895,7 @@ final class PeerInfoHeaderNode: ASDisplayNode {
|
|||||||
|
|
||||||
subtitleStringText = statusText
|
subtitleStringText = statusText
|
||||||
subtitleAttributes = MultiScaleTextState.Attributes(font: Font.semibold(16.0), color: subtitleColor)
|
subtitleAttributes = MultiScaleTextState.Attributes(font: Font.semibold(16.0), color: subtitleColor)
|
||||||
smallSubtitleAttributes = MultiScaleTextState.Attributes(font: Font.regular(16.0), color: .white)
|
smallSubtitleAttributes = MultiScaleTextState.Attributes(font: Font.regular(16.0), color: .white, shadowColor: titleShadowColor)
|
||||||
|
|
||||||
usernameString = ("", MultiScaleTextState.Attributes(font: Font.regular(16.0), color: .white))
|
usernameString = ("", MultiScaleTextState.Attributes(font: Font.regular(16.0), color: .white))
|
||||||
|
|
||||||
@ -919,7 +921,7 @@ final class PeerInfoHeaderNode: ASDisplayNode {
|
|||||||
|
|
||||||
subtitleStringText = statusData.text
|
subtitleStringText = statusData.text
|
||||||
subtitleAttributes = MultiScaleTextState.Attributes(font: Font.regular(17.0), color: subtitleColor)
|
subtitleAttributes = MultiScaleTextState.Attributes(font: Font.regular(17.0), color: subtitleColor)
|
||||||
smallSubtitleAttributes = MultiScaleTextState.Attributes(font: Font.regular(16.0), color: .white)
|
smallSubtitleAttributes = MultiScaleTextState.Attributes(font: Font.regular(16.0), color: .white, shadowColor: titleShadowColor)
|
||||||
|
|
||||||
usernameString = ("", MultiScaleTextState.Attributes(font: Font.regular(16.0), color: .white))
|
usernameString = ("", MultiScaleTextState.Attributes(font: Font.regular(16.0), color: .white))
|
||||||
|
|
||||||
@ -936,18 +938,18 @@ final class PeerInfoHeaderNode: ASDisplayNode {
|
|||||||
} else {
|
} else {
|
||||||
subtitleStringText = " "
|
subtitleStringText = " "
|
||||||
subtitleAttributes = MultiScaleTextState.Attributes(font: Font.regular(16.0), color: .white)
|
subtitleAttributes = MultiScaleTextState.Attributes(font: Font.regular(16.0), color: .white)
|
||||||
smallSubtitleAttributes = MultiScaleTextState.Attributes(font: Font.regular(16.0), color: .white)
|
smallSubtitleAttributes = MultiScaleTextState.Attributes(font: Font.regular(16.0), color: .white, shadowColor: titleShadowColor)
|
||||||
|
|
||||||
usernameString = ("", MultiScaleTextState.Attributes(font: Font.regular(16.0), color: .white))
|
usernameString = ("", MultiScaleTextState.Attributes(font: Font.regular(16.0), color: .white))
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
titleStringText = " "
|
titleStringText = " "
|
||||||
titleAttributes = MultiScaleTextState.Attributes(font: Font.regular(24.0), color: .white)
|
titleAttributes = MultiScaleTextState.Attributes(font: Font.regular(24.0), color: .white)
|
||||||
smallTitleAttributes = MultiScaleTextState.Attributes(font: Font.regular(24.0), color: .white)
|
smallTitleAttributes = MultiScaleTextState.Attributes(font: Font.regular(24.0), color: .white, shadowColor: titleShadowColor)
|
||||||
|
|
||||||
subtitleStringText = " "
|
subtitleStringText = " "
|
||||||
subtitleAttributes = MultiScaleTextState.Attributes(font: Font.regular(16.0), color: .white)
|
subtitleAttributes = MultiScaleTextState.Attributes(font: Font.regular(16.0), color: .white)
|
||||||
smallSubtitleAttributes = MultiScaleTextState.Attributes(font: Font.regular(16.0), color: .white)
|
smallSubtitleAttributes = MultiScaleTextState.Attributes(font: Font.regular(16.0), color: .white, shadowColor: titleShadowColor)
|
||||||
|
|
||||||
usernameString = ("", MultiScaleTextState.Attributes(font: Font.regular(16.0), color: .white))
|
usernameString = ("", MultiScaleTextState.Attributes(font: Font.regular(16.0), color: .white))
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user