From 777d1f378c3d932a1510696b6b4b56abd98d5f66 Mon Sep 17 00:00:00 2001 From: Shadowfacts Date: Wed, 24 Nov 2021 15:15:34 -0500 Subject: [PATCH] Fix hashtag history view background being opaque --- Tusker/Views/Hashtag Cell/HashtagHistoryView.swift | 5 ++++- .../Hashtag Cell/TrendingHashtagTableViewCell.xib | 13 ++++--------- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/Tusker/Views/Hashtag Cell/HashtagHistoryView.swift b/Tusker/Views/Hashtag Cell/HashtagHistoryView.swift index 90226d84..07116acb 100644 --- a/Tusker/Views/Hashtag Cell/HashtagHistoryView.swift +++ b/Tusker/Views/Hashtag Cell/HashtagHistoryView.swift @@ -15,6 +15,9 @@ class HashtagHistoryView: UIView { private let curveRadius: CGFloat = 10 + /// The base background color used for the graph fill. + var effectiveBackgroundColor = UIColor.systemBackground + override func layoutSubviews() { super.layoutSubviews() @@ -121,7 +124,7 @@ class HashtagHistoryView: UIView { var tintGreen: CGFloat = 0 var tintBlue: CGFloat = 0 traitCollection.performAsCurrent { - backgroundColor!.getRed(&backgroundRed, green: &backgroundGreen, blue: &backgroundBlue, alpha: nil) + effectiveBackgroundColor.getRed(&backgroundRed, green: &backgroundGreen, blue: &backgroundBlue, alpha: nil) tintColor.getRed(&tintRed, green: &tintGreen, blue: &tintBlue, alpha: nil) } let blendedRed = (backgroundRed + tintRed) / 2 diff --git a/Tusker/Views/Hashtag Cell/TrendingHashtagTableViewCell.xib b/Tusker/Views/Hashtag Cell/TrendingHashtagTableViewCell.xib index 2c44fc0b..df56871a 100644 --- a/Tusker/Views/Hashtag Cell/TrendingHashtagTableViewCell.xib +++ b/Tusker/Views/Hashtag Cell/TrendingHashtagTableViewCell.xib @@ -1,10 +1,10 @@ - + - + + - @@ -39,7 +39,7 @@ - + @@ -64,9 +64,4 @@ - - - - -