diff --git a/submodules/GraphCore/Sources/Charts/Renderes/LinesChartRenderer.swift b/submodules/GraphCore/Sources/Charts/Renderes/LinesChartRenderer.swift index 789b3d4c93..1086140be4 100644 --- a/submodules/GraphCore/Sources/Charts/Renderes/LinesChartRenderer.swift +++ b/submodules/GraphCore/Sources/Charts/Renderes/LinesChartRenderer.swift @@ -59,7 +59,8 @@ class LinesChartRenderer: BaseChartRenderer { if chartsAlpha == 0 { return } let range = renderRange(bounds: bounds, chartFrame: chartFrame) - context.clip(to: CGRect(origin: CGPoint(x: 0.0, y: chartFrame.minY), size: CGSize(width: chartFrame.width + chartFrame.origin.x * 2.0, height: chartFrame.height))) + let spacing: CGFloat = 1.0 + context.clip(to: CGRect(origin: CGPoint(x: 0.0, y: chartFrame.minY - spacing), size: CGSize(width: chartFrame.width + chartFrame.origin.x * 2.0, height: chartFrame.height + spacing * 2.0))) for (index, toLine) in toLines.enumerated() { let alpha = linesAlphaAnimators[index].current * chartsAlpha diff --git a/submodules/GraphCore/Sources/Charts/Renderes/VerticalScalesRenderer.swift b/submodules/GraphCore/Sources/Charts/Renderes/VerticalScalesRenderer.swift index ba0af18a5c..857d91531e 100644 --- a/submodules/GraphCore/Sources/Charts/Renderes/VerticalScalesRenderer.swift +++ b/submodules/GraphCore/Sources/Charts/Renderes/VerticalScalesRenderer.swift @@ -101,6 +101,10 @@ class VerticalScalesRenderer: BaseChartRenderer { let labelColorAlpha = labelsColor.alphaValue func drawLines(_ labels: [LinesChartLabel], alpha: CGFloat) { + var labels = labels + if labels.count > 1 { + labels.removeFirst() + } var lineSegments: [CGPoint] = [] let x0 = chartFrame.minX let x1 = chartFrame.maxX diff --git a/submodules/TelegramPresentationData/Sources/DefaultDarkPresentationTheme.swift b/submodules/TelegramPresentationData/Sources/DefaultDarkPresentationTheme.swift index a7e55af8eb..4aa099a937 100644 --- a/submodules/TelegramPresentationData/Sources/DefaultDarkPresentationTheme.swift +++ b/submodules/TelegramPresentationData/Sources/DefaultDarkPresentationTheme.swift @@ -546,8 +546,8 @@ public func makeDefaultDarkPresentationTheme(extendingThemeReference: Presentati ) let chart = PresentationThemeChart( labelsColor: UIColor(rgb: 0x8e8e93), - helperLinesColor: UIColor(rgb: 0xd8d8d8, alpha: 0.2), - strongLinesColor: UIColor(rgb: 0xd8d8d8, alpha: 0.6), + helperLinesColor: UIColor(rgb: 0xd8d8d8, alpha: 0.35), + strongLinesColor: UIColor(rgb: 0xd8d8d8, alpha: 0.35), barStrongLinesColor: UIColor(rgb: 0xd8d8d8, alpha: 0.45), detailsTextColor: UIColor(rgb: 0xffffff), detailsArrowColor: UIColor(rgb: 0xd8d8d8), diff --git a/submodules/TelegramPresentationData/Sources/DefaultDarkTintedPresentationTheme.swift b/submodules/TelegramPresentationData/Sources/DefaultDarkTintedPresentationTheme.swift index ada9d35602..6b3e87ef20 100644 --- a/submodules/TelegramPresentationData/Sources/DefaultDarkTintedPresentationTheme.swift +++ b/submodules/TelegramPresentationData/Sources/DefaultDarkTintedPresentationTheme.swift @@ -424,8 +424,8 @@ public func customizeDefaultDarkTintedPresentationTheme(theme: PresentationTheme chart = chart.withUpdated( labelsColor: accentColor?.withMultiplied(hue: 1.033, saturation: 0.211, brightness: 0.882).withAlphaComponent(0.6), - helperLinesColor: accentColor?.withMultiplied(hue: 1.037, saturation: 0.271, brightness: 0.671).withAlphaComponent(0.2), - strongLinesColor: accentColor?.withMultiplied(hue: 1.033, saturation: 0.211, brightness: 0.882).withAlphaComponent(0.6), + helperLinesColor: accentColor?.withMultiplied(hue: 1.037, saturation: 0.271, brightness: 0.671).withAlphaComponent(0.35), + strongLinesColor: accentColor?.withMultiplied(hue: 1.037, saturation: 0.271, brightness: 0.671).withAlphaComponent(0.35), barStrongLinesColor: accentColor?.withMultiplied(hue: 1.033, saturation: 0.211, brightness: 0.882).withAlphaComponent(0.45), detailsArrowColor: accentColor?.withMultiplied(hue: 1.051, saturation: 0.254, brightness: 0.376), detailsViewColor: accentColor?.withMultiplied(hue: 1.035, saturation: 0.571, brightness: 0.184), @@ -804,8 +804,8 @@ public func makeDefaultDarkTintedPresentationTheme(extendingThemeReference: Pres let chart = PresentationThemeChart( labelsColor: UIColor(rgb: 0xbacce1, alpha: 0.6), - helperLinesColor: UIColor(rgb: 0x8596ab, alpha: 0.2), - strongLinesColor: UIColor(rgb: 0xbacce1, alpha: 0.6), + helperLinesColor: UIColor(rgb: 0xbacce1, alpha: 0.35), + strongLinesColor: UIColor(rgb: 0xbacce1, alpha: 0.35), barStrongLinesColor: UIColor(rgb: 0xbacce1, alpha: 0.45), detailsTextColor: UIColor(rgb: 0xffffff), detailsArrowColor: UIColor(rgb: 0x4c5460), diff --git a/submodules/TelegramPresentationData/Sources/DefaultDayPresentationTheme.swift b/submodules/TelegramPresentationData/Sources/DefaultDayPresentationTheme.swift index 61d2af2670..d8632cd843 100644 --- a/submodules/TelegramPresentationData/Sources/DefaultDayPresentationTheme.swift +++ b/submodules/TelegramPresentationData/Sources/DefaultDayPresentationTheme.swift @@ -758,8 +758,8 @@ public func makeDefaultDayPresentationTheme(extendingThemeReference: Presentatio let chart = PresentationThemeChart( labelsColor: UIColor(rgb: 0x252529, alpha: 0.5), - helperLinesColor: UIColor(rgb: 0x182d3b, alpha: 0.1), - strongLinesColor: UIColor(rgb: 0x182d3b, alpha: 0.35), + helperLinesColor: UIColor(rgb: 0x182d3b, alpha: 0.3), + strongLinesColor: UIColor(rgb: 0x182d3b, alpha: 0.3), barStrongLinesColor: UIColor(rgb: 0x252529, alpha: 0.2), detailsTextColor: UIColor(rgb: 0x6d6d72), detailsArrowColor: UIColor(rgb: 0xc5c7cd), diff --git a/submodules/TelegramUI/Sources/ManagedDiceAnimationNode.swift b/submodules/TelegramUI/Sources/ManagedDiceAnimationNode.swift index 15c8d394d5..36e1169c7a 100644 --- a/submodules/TelegramUI/Sources/ManagedDiceAnimationNode.swift +++ b/submodules/TelegramUI/Sources/ManagedDiceAnimationNode.swift @@ -64,7 +64,7 @@ final class ManagedDiceAnimationNode: ManagedAnimationNode, GenericAnimatedStick self.disposable.set(sticker.start(next: { [weak self] data in if let strongSelf = self { - strongSelf.trackTo(item: ManagedAnimationItem(source: .resource(strongSelf.context.account.postbox.mediaBox, file.resource), frames: ManagedAnimationFrameRange(startFrame: 0, endFrame: 0), duration: 0.3)) + strongSelf.trackTo(item: ManagedAnimationItem(source: .resource(strongSelf.context.account.postbox.mediaBox, file.resource), frames: ManagedAnimationFrameRange(startFrame: 0, endFrame: 180), duration: 3.0)) } })) case .rolling: @@ -73,7 +73,7 @@ final class ManagedDiceAnimationNode: ManagedAnimationNode, GenericAnimatedStick case let .value(currentValue): switch diceState { case .rolling: - self.trackTo(item: ManagedAnimationItem(source: .local("DiceRolling"), frames: ManagedAnimationFrameRange(startFrame: 0, endFrame: 0), duration: 0.3, loop: true)) + self.trackTo(item: ManagedAnimationItem(source: .local("DiceRolling"), frames: ManagedAnimationFrameRange(startFrame: 0, endFrame: 180), duration: 3.0, loop: true)) case let .value(value): break } @@ -103,7 +103,7 @@ final class ManagedDiceAnimationNode: ManagedAnimationNode, GenericAnimatedStick self.disposable.set(sticker.start(next: { [weak self] data in if let strongSelf = self { - strongSelf.trackTo(item: ManagedAnimationItem(source: .resource(strongSelf.context.account.postbox.mediaBox, file.resource), frames: ManagedAnimationFrameRange(startFrame: 0, endFrame: 0), duration: 0.3)) + strongSelf.trackTo(item: ManagedAnimationItem(source: .resource(strongSelf.context.account.postbox.mediaBox, file.resource), frames: ManagedAnimationFrameRange(startFrame: 0, endFrame: 180), duration: 3.0)) } })) case .rolling: