diff --git a/submodules/Display/Source/TextNode.swift b/submodules/Display/Source/TextNode.swift index 33a5b16f94..6d3c386c9f 100644 --- a/submodules/Display/Source/TextNode.swift +++ b/submodules/Display/Source/TextNode.swift @@ -2242,7 +2242,7 @@ open class TextNode: ASDisplayNode { let dashOffset: CGFloat if let _ = tertiaryTintColor { - dashOffset = isMonochrome ? -2.0 : 0.0 + dashOffset = isMonochrome ? -7.0 : 5.0 } else { dashOffset = isMonochrome ? -4.0 : 5.0 } @@ -2257,6 +2257,10 @@ open class TextNode: ASDisplayNode { context.setFillColor(secondaryTintColor.cgColor) } + if let _ = tertiaryTintColor { + context.translateBy(x: 0.0, y: dashHeight) + } + func drawDashes() { context.translateBy(x: blockFrame.minX, y: blockFrame.minY + dashOffset) @@ -2279,7 +2283,6 @@ open class TextNode: ASDisplayNode { if let tertiaryTintColor { context.saveGState() - context.translateBy(x: 0.0, y: dashHeight) if isMonochrome { context.setFillColor(blockQuote.tintColor.withAlphaComponent(0.4).cgColor) } else { diff --git a/submodules/TelegramUI/Components/Chat/MessageInlineBlockBackgroundView/Sources/MessageInlineBlockBackgroundView.swift b/submodules/TelegramUI/Components/Chat/MessageInlineBlockBackgroundView/Sources/MessageInlineBlockBackgroundView.swift index 67f5f2a132..0f91d1ceb5 100644 --- a/submodules/TelegramUI/Components/Chat/MessageInlineBlockBackgroundView/Sources/MessageInlineBlockBackgroundView.swift +++ b/submodules/TelegramUI/Components/Chat/MessageInlineBlockBackgroundView/Sources/MessageInlineBlockBackgroundView.swift @@ -99,7 +99,7 @@ private func generateDashTemplateImage(isMonochrome: Bool, isTriple: Bool) -> UI let dashOffset: CGFloat if isTriple { - dashOffset = isMonochrome ? -2.0 : 0.0 + dashOffset = isMonochrome ? -7.0 : 5.0 } else { dashOffset = isMonochrome ? -4.0 : 5.0 } @@ -324,7 +324,7 @@ private final class LineView: UIView { self.backgroundView.tintColor = primaryColor if let secondaryColor { - let dashBackgroundFrame = CGRect(origin: CGPoint(x: 0.0, y: -18.0), size: CGSize(width: radius * 2.0, height: size.height + 18.0)) + let dashBackgroundFrame = CGRect(origin: CGPoint(x: 0.0, y: thirdColor != nil ? -12.0 : -18.0), size: CGSize(width: radius * 2.0, height: size.height + 18.0)) let dashBackgroundView: UIImageView if let current = self.dashBackgroundView { @@ -343,7 +343,7 @@ private final class LineView: UIView { let monochromeTemplateImage: UIImage if let thirdColor { - let thirdDashBackgroundFrame = CGRect(origin: CGPoint(x: 0.0, y: -12.0), size: CGSize(width: radius * 2.0, height: size.height + 18.0)) + let thirdDashBackgroundFrame = CGRect(origin: CGPoint(x: 0.0, y: -18.0), size: CGSize(width: radius * 2.0, height: size.height + 18.0)) templateImage = dashOpaqueTripleTemplateImage monochromeTemplateImage = dashMonochromeTripleTemplateImage