Various improvements

This commit is contained in:
Ilya Laktyushin
2022-05-13 05:30:49 +04:00
parent 81f179be9d
commit 29aff4a8a6
36 changed files with 608 additions and 161 deletions

View File

@@ -2306,12 +2306,13 @@ final class PeerInfoHeaderNode: ASDisplayNode {
context.clip(to: CGRect(origin: .zero, size: size), mask: cgImage)
let colorsArray: [CGColor] = [
UIColor(rgb: 0xa34ecf).cgColor,
UIColor(rgb: 0xa34ecf).cgColor,
UIColor(rgb: 0xff7923).cgColor,
UIColor(rgb: 0xff7923).cgColor
UIColor(rgb: 0x6B93FF).cgColor,
UIColor(rgb: 0x6B93FF).cgColor,
UIColor(rgb: 0x976FFF).cgColor,
UIColor(rgb: 0xE46ACE).cgColor,
UIColor(rgb: 0xE46ACE).cgColor
]
var locations: [CGFloat] = [0.0, 0.35, 0.65, 1.0]
var locations: [CGFloat] = [0.0, 0.35, 0.5, 0.65, 1.0]
let gradient = CGGradient(colorsSpace: deviceColorSpace, colors: colorsArray as CFArray, locations: &locations)!
context.drawLinearGradient(gradient, start: CGPoint(x: 0.0, y: 0.0), end: CGPoint(x: size.width, y: size.height), options: CGGradientDrawingOptions())