mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-16 05:55:20 +00:00
Update default blue accent color
This commit is contained in:
parent
4a12dcbb22
commit
38c483c335
@ -16,7 +16,7 @@ private func generateIndefiniteActivityIndicatorImage(color: UIColor, diameter:
|
|||||||
}
|
}
|
||||||
|
|
||||||
private func convertIndicatorColor(_ color: UIColor) -> UIColor {
|
private func convertIndicatorColor(_ color: UIColor) -> UIColor {
|
||||||
if color.isEqual(UIColor(rgb: 0x007ee5)) {
|
if color.isEqual(UIColor(rgb: 0x007aff)) {
|
||||||
return .gray
|
return .gray
|
||||||
} else if color.isEqual(UIColor(rgb: 0x2ea6ff)) {
|
} else if color.isEqual(UIColor(rgb: 0x2ea6ff)) {
|
||||||
return .white
|
return .white
|
||||||
|
@ -31,7 +31,7 @@ public class NavigationBackButtonNode: ASControlNode {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public var color: UIColor = UIColor(rgb: 0x007ee5) {
|
public var color: UIColor = UIColor(rgb: 0x007aff) {
|
||||||
didSet {
|
didSet {
|
||||||
self.label.attributedText = NSAttributedString(string: self._text, attributes: self.attributesForCurrentState())
|
self.label.attributedText = NSAttributedString(string: self._text, attributes: self.attributesForCurrentState())
|
||||||
}
|
}
|
||||||
|
@ -104,7 +104,7 @@ private final class NavigationButtonItemNode: ImmediateTextNode {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public var color: UIColor = UIColor(rgb: 0x007ee5) {
|
public var color: UIColor = UIColor(rgb: 0x007aff) {
|
||||||
didSet {
|
didSet {
|
||||||
if let text = self._text {
|
if let text = self._text {
|
||||||
self.attributedText = NSAttributedString(string: text, attributes: self.attributesForCurrentState())
|
self.attributedText = NSAttributedString(string: text, attributes: self.attributesForCurrentState())
|
||||||
@ -332,7 +332,7 @@ public final class NavigationButtonNode: ASDisplayNode {
|
|||||||
public var pressed: (Int) -> () = { _ in }
|
public var pressed: (Int) -> () = { _ in }
|
||||||
public var highlightChanged: (Int, Bool) -> () = { _, _ in }
|
public var highlightChanged: (Int, Bool) -> () = { _, _ in }
|
||||||
|
|
||||||
public var color: UIColor = UIColor(rgb: 0x007ee5) {
|
public var color: UIColor = UIColor(rgb: 0x007aff) {
|
||||||
didSet {
|
didSet {
|
||||||
if !self.color.isEqual(oldValue) {
|
if !self.color.isEqual(oldValue) {
|
||||||
for node in self.nodes {
|
for node in self.nodes {
|
||||||
|
@ -323,7 +323,7 @@ public struct GalleryConfiguration {
|
|||||||
|
|
||||||
public class GalleryController: ViewController, StandalonePresentableController {
|
public class GalleryController: ViewController, StandalonePresentableController {
|
||||||
public static let darkNavigationTheme = NavigationBarTheme(buttonColor: .white, disabledButtonColor: UIColor(rgb: 0x525252), primaryTextColor: .white, backgroundColor: UIColor(white: 0.0, alpha: 0.6), enableBackgroundBlur: false, separatorColor: UIColor(white: 0.0, alpha: 0.8), badgeBackgroundColor: .clear, badgeStrokeColor: .clear, badgeTextColor: .clear)
|
public static let darkNavigationTheme = NavigationBarTheme(buttonColor: .white, disabledButtonColor: UIColor(rgb: 0x525252), primaryTextColor: .white, backgroundColor: UIColor(white: 0.0, alpha: 0.6), enableBackgroundBlur: false, separatorColor: UIColor(white: 0.0, alpha: 0.8), badgeBackgroundColor: .clear, badgeStrokeColor: .clear, badgeTextColor: .clear)
|
||||||
public static let lightNavigationTheme = NavigationBarTheme(buttonColor: UIColor(rgb: 0x007ee5), disabledButtonColor: UIColor(rgb: 0xd0d0d0), primaryTextColor: .black, backgroundColor: UIColor(red: 0.968626451, green: 0.968626451, blue: 0.968626451, alpha: 1.0), enableBackgroundBlur: false, separatorColor: UIColor(red: 0.6953125, green: 0.6953125, blue: 0.6953125, alpha: 1.0), badgeBackgroundColor: .clear, badgeStrokeColor: .clear, badgeTextColor: .clear)
|
public static let lightNavigationTheme = NavigationBarTheme(buttonColor: UIColor(rgb: 0x007aff), disabledButtonColor: UIColor(rgb: 0xd0d0d0), primaryTextColor: .black, backgroundColor: UIColor(red: 0.968626451, green: 0.968626451, blue: 0.968626451, alpha: 1.0), enableBackgroundBlur: false, separatorColor: UIColor(red: 0.6953125, green: 0.6953125, blue: 0.6953125, alpha: 1.0), badgeBackgroundColor: .clear, badgeStrokeColor: .clear, badgeTextColor: .clear)
|
||||||
|
|
||||||
private var galleryNode: GalleryControllerNode {
|
private var galleryNode: GalleryControllerNode {
|
||||||
return self.displayNode as! GalleryControllerNode
|
return self.displayNode as! GalleryControllerNode
|
||||||
|
@ -68,10 +68,10 @@ class ChartStackSection: UIView, ChartThemeContainer {
|
|||||||
backButton.addTarget(self, action: #selector(self.didTapBackButton), for: .touchUpInside)
|
backButton.addTarget(self, action: #selector(self.didTapBackButton), for: .touchUpInside)
|
||||||
backButton.setTitle("Zoom Out", for: .normal)
|
backButton.setTitle("Zoom Out", for: .normal)
|
||||||
backButton.titleLabel?.font = UIFont.systemFont(ofSize: 14, weight: .regular)
|
backButton.titleLabel?.font = UIFont.systemFont(ofSize: 14, weight: .regular)
|
||||||
backButton.setTitleColor(UIColor(rgb: 0x007ee5), for: .normal)
|
backButton.setTitleColor(UIColor(rgb: 0x007aff), for: .normal)
|
||||||
backButton.setImage(UIImage(bundleImageName: "Chart/arrow_left"), for: .normal)
|
backButton.setImage(UIImage(bundleImageName: "Chart/arrow_left"), for: .normal)
|
||||||
backButton.imageEdgeInsets = UIEdgeInsets(top: 0.0, left: 6.0, bottom: 0.0, right: 3.0)
|
backButton.imageEdgeInsets = UIEdgeInsets(top: 0.0, left: 6.0, bottom: 0.0, right: 3.0)
|
||||||
backButton.imageView?.tintColor = UIColor(rgb: 0x007ee5)
|
backButton.imageView?.tintColor = UIColor(rgb: 0x007aff)
|
||||||
|
|
||||||
backButton.setVisible(false, animated: false)
|
backButton.setVisible(false, animated: false)
|
||||||
}
|
}
|
||||||
|
@ -801,7 +801,7 @@ final class InstantPageControllerNode: ASDisplayNode, UIScrollViewDelegate {
|
|||||||
if let current = self.linkHighlightingNode {
|
if let current = self.linkHighlightingNode {
|
||||||
linkHighlightingNode = current
|
linkHighlightingNode = current
|
||||||
} else {
|
} else {
|
||||||
let highlightColor = self.theme?.linkHighlightColor ?? UIColor(rgb: 0x007ee5).withAlphaComponent(0.4)
|
let highlightColor = self.theme?.linkHighlightColor ?? UIColor(rgb: 0x007aff).withAlphaComponent(0.4)
|
||||||
linkHighlightingNode = LinkHighlightingNode(color: highlightColor)
|
linkHighlightingNode = LinkHighlightingNode(color: highlightColor)
|
||||||
linkHighlightingNode.isUserInteractionEnabled = false
|
linkHighlightingNode.isUserInteractionEnabled = false
|
||||||
self.linkHighlightingNode = linkHighlightingNode
|
self.linkHighlightingNode = linkHighlightingNode
|
||||||
|
@ -69,7 +69,7 @@ private let lightTheme = InstantPageSettingsItemTheme(
|
|||||||
separatorColor: UIColor(rgb: 0xc8c7cc),
|
separatorColor: UIColor(rgb: 0xc8c7cc),
|
||||||
primaryColor: .black,
|
primaryColor: .black,
|
||||||
secondaryColor: UIColor(rgb: 0xa8a8a8),
|
secondaryColor: UIColor(rgb: 0xa8a8a8),
|
||||||
accentColor: UIColor(rgb: 0x007ee5)
|
accentColor: UIColor(rgb: 0x007aff)
|
||||||
)
|
)
|
||||||
|
|
||||||
private let sepiaTheme = InstantPageSettingsItemTheme(
|
private let sepiaTheme = InstantPageSettingsItemTheme(
|
||||||
|
@ -101,7 +101,7 @@ final class InstantPageSettingsThemeItemNode: InstantPageSettingsItemNode {
|
|||||||
selectedIndex = 3
|
selectedIndex = 3
|
||||||
}
|
}
|
||||||
|
|
||||||
let selectionColor = UIColor(rgb: 0x007ee5)
|
let selectionColor = UIColor(rgb: 0x007aff)
|
||||||
self.themeNodes = [
|
self.themeNodes = [
|
||||||
InstantPageSettingsThemeSelectorNode(color: .white, edgeColor: (selectedIndex == 1 || selectedIndex == 2) ? UIColor.lightGray : UIColor.white, selectionColor: selectionColor),
|
InstantPageSettingsThemeSelectorNode(color: .white, edgeColor: (selectedIndex == 1 || selectedIndex == 2) ? UIColor.lightGray : UIColor.white, selectionColor: selectionColor),
|
||||||
InstantPageSettingsThemeSelectorNode(color: UIColor(rgb: 0xcbb98e), edgeColor: UIColor(rgb: 0xcbb98e), selectionColor: selectionColor),
|
InstantPageSettingsThemeSelectorNode(color: UIColor(rgb: 0xcbb98e), edgeColor: UIColor(rgb: 0xcbb98e), selectionColor: selectionColor),
|
||||||
|
@ -153,15 +153,15 @@ private let lightTheme = InstantPageTheme(
|
|||||||
),
|
),
|
||||||
serif: false,
|
serif: false,
|
||||||
codeBlockBackgroundColor: UIColor(rgb: 0xf5f8fc),
|
codeBlockBackgroundColor: UIColor(rgb: 0xf5f8fc),
|
||||||
linkColor: UIColor(rgb: 0x007ee5),
|
linkColor: UIColor(rgb: 0x007aff),
|
||||||
textHighlightColor: UIColor(rgb: 0, alpha: 0.12),
|
textHighlightColor: UIColor(rgb: 0, alpha: 0.12),
|
||||||
linkHighlightColor: UIColor(rgb: 0x007ee5, alpha: 0.07),
|
linkHighlightColor: UIColor(rgb: 0x007aff, alpha: 0.07),
|
||||||
markerColor: UIColor(rgb: 0xfef3bc),
|
markerColor: UIColor(rgb: 0xfef3bc),
|
||||||
panelBackgroundColor: UIColor(rgb: 0xf3f4f5),
|
panelBackgroundColor: UIColor(rgb: 0xf3f4f5),
|
||||||
panelHighlightedBackgroundColor: UIColor(rgb: 0xe7e7e7),
|
panelHighlightedBackgroundColor: UIColor(rgb: 0xe7e7e7),
|
||||||
panelPrimaryColor: .black,
|
panelPrimaryColor: .black,
|
||||||
panelSecondaryColor: UIColor(rgb: 0x79828b),
|
panelSecondaryColor: UIColor(rgb: 0x79828b),
|
||||||
panelAccentColor: UIColor(rgb: 0x007ee5),
|
panelAccentColor: UIColor(rgb: 0x007aff),
|
||||||
tableBorderColor: UIColor(rgb: 0xe2e2e2),
|
tableBorderColor: UIColor(rgb: 0xe2e2e2),
|
||||||
tableHeaderColor: UIColor(rgb: 0xf4f4f4),
|
tableHeaderColor: UIColor(rgb: 0xf4f4f4),
|
||||||
controlColor: UIColor(rgb: 0xc7c7cd),
|
controlColor: UIColor(rgb: 0xc7c7cd),
|
||||||
|
@ -60,7 +60,7 @@
|
|||||||
int32_t hex = 0x29c519;
|
int32_t hex = 0x29c519;
|
||||||
UIColor *greenColor = [[UIColor alloc] initWithRed:(((hex >> 16) & 0xff) / 255.0f) green:(((hex >> 8) & 0xff) / 255.0f) blue:(((hex) & 0xff) / 255.0f) alpha:1.0f];
|
UIColor *greenColor = [[UIColor alloc] initWithRed:(((hex >> 16) & 0xff) / 255.0f) green:(((hex >> 8) & 0xff) / 255.0f) blue:(((hex) & 0xff) / 255.0f) alpha:1.0f];
|
||||||
|
|
||||||
hex = 0x007ee5;
|
hex = 0x007aff;
|
||||||
UIColor *blueColor = [[UIColor alloc] initWithRed:(((hex >> 16) & 0xff) / 255.0f) green:(((hex >> 8) & 0xff) / 255.0f) blue:(((hex) & 0xff) / 255.0f) alpha:1.0f];
|
UIColor *blueColor = [[UIColor alloc] initWithRed:(((hex >> 16) & 0xff) / 255.0f) green:(((hex >> 8) & 0xff) / 255.0f) blue:(((hex) & 0xff) / 255.0f) alpha:1.0f];
|
||||||
|
|
||||||
hex = 0xcacacf;
|
hex = 0xcacacf;
|
||||||
|
@ -16,7 +16,7 @@ UIColor *TGAccentColor()
|
|||||||
static dispatch_once_t onceToken;
|
static dispatch_once_t onceToken;
|
||||||
dispatch_once(&onceToken, ^
|
dispatch_once(&onceToken, ^
|
||||||
{
|
{
|
||||||
color = TGColorWithHex(0x007ee5);
|
color = TGColorWithHex(0x007aff);
|
||||||
});
|
});
|
||||||
return color;
|
return color;
|
||||||
}
|
}
|
||||||
|
@ -385,7 +385,7 @@ private final class ThemeSettingsAccentColorIconItemNode : ListViewItemNode {
|
|||||||
topColor = bubbleColor
|
topColor = bubbleColor
|
||||||
bottomColor = bubbleColor
|
bottomColor = bubbleColor
|
||||||
} else {
|
} else {
|
||||||
fillColor = UIColor(rgb: 0x007ee5)
|
fillColor = UIColor(rgb: 0x007aff)
|
||||||
strokeColor = fillColor
|
strokeColor = fillColor
|
||||||
topColor = UIColor(rgb: 0xe1ffc7)
|
topColor = UIColor(rgb: 0xe1ffc7)
|
||||||
bottomColor = topColor
|
bottomColor = topColor
|
||||||
|
@ -8,8 +8,8 @@ import ObjCRuntimeUtils
|
|||||||
private let innerCircleDiameter: CGFloat = 110.0
|
private let innerCircleDiameter: CGFloat = 110.0
|
||||||
private let outerCircleDiameter = innerCircleDiameter + 50.0
|
private let outerCircleDiameter = innerCircleDiameter + 50.0
|
||||||
private let outerCircleMinScale = innerCircleDiameter / outerCircleDiameter
|
private let outerCircleMinScale = innerCircleDiameter / outerCircleDiameter
|
||||||
private let innerCircleImage = generateFilledCircleImage(diameter: innerCircleDiameter, color: UIColor(rgb: 0x007ee5))
|
private let innerCircleImage = generateFilledCircleImage(diameter: innerCircleDiameter, color: UIColor(rgb: 0x007aff))
|
||||||
private let outerCircleImage = generateFilledCircleImage(diameter: outerCircleDiameter, color: UIColor(rgb: 0x007ee5, alpha: 0.2))
|
private let outerCircleImage = generateFilledCircleImage(diameter: outerCircleDiameter, color: UIColor(rgb: 0x007aff, alpha: 0.2))
|
||||||
private let micIcon = generateTintedImage(image: UIImage(bundleImageName: "Chat/Input/Text/IconMicrophone"), color: .white)!
|
private let micIcon = generateTintedImage(image: UIImage(bundleImageName: "Chat/Input/Text/IconMicrophone"), color: .white)!
|
||||||
|
|
||||||
private final class ChatTextInputAudioRecordingOverlayDisplayLinkTarget: NSObject {
|
private final class ChatTextInputAudioRecordingOverlayDisplayLinkTarget: NSObject {
|
||||||
|
@ -34,7 +34,7 @@ private final class LegacyDataImportSplashImpl: WindowCoveringView, LegacyDataIm
|
|||||||
self.updateLayout(size)
|
self.updateLayout(size)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
self.progressNode.transitionToState(.progress(color: self.theme?.list.itemAccentColor ?? UIColor(rgb: 0x007ee5), lineWidth: 2.0, value: CGFloat(max(0.025, self.progress.1)), cancelEnabled: false, animateRotation: true), animated: false, completion: {})
|
self.progressNode.transitionToState(.progress(color: self.theme?.list.itemAccentColor ?? UIColor(rgb: 0x007aff), lineWidth: 2.0, value: CGFloat(max(0.025, self.progress.1)), cancelEnabled: false, animateRotation: true), animated: false, completion: {})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user