|
1 | 1 | import UIKit |
2 | 2 | import Gridicons |
| 3 | +import DesignSystem |
3 | 4 |
|
4 | 5 | class StatsLatestPostSummaryInsightsCell: StatsBaseCell, LatestPostSummaryConfigurable { |
5 | 6 | private weak var siteStatsInsightsDelegate: SiteStatsInsightsDelegate? |
@@ -140,19 +141,18 @@ class StatsLatestPostSummaryInsightsCell: StatsBaseCell, LatestPostSummaryConfig |
140 | 141 | let stackView = UIStackView() |
141 | 142 | stackView.translatesAutoresizingMaskIntoConstraints = false |
142 | 143 | stackView.axis = .vertical |
143 | | - stackView.spacing = Metrics.statsStackViewVerticalSpacing |
| 144 | + stackView.spacing = 0 |
144 | 145 |
|
145 | 146 | let topLabel = UILabel() |
146 | | - topLabel.font = UIFont.preferredFont(forTextStyle: .subheadline) |
147 | | - topLabel.textColor = .text |
148 | 147 | topLabel.text = title |
149 | 148 | topLabel.adjustsFontSizeToFitWidth = true |
| 149 | + topLabel.adjustsFontForContentSizeCategory = true |
| 150 | + Style.configureLabelAsCellValueTitle(topLabel) |
150 | 151 |
|
151 | | - countLabel.font = Style.insightsCountFont |
152 | | - countLabel.textColor = .text |
153 | 152 | countLabel.adjustsFontSizeToFitWidth = true |
154 | 153 | countLabel.adjustsFontForContentSizeCategory = true |
155 | 154 | countLabel.text = "0" |
| 155 | + Style.configureLabelAsCellValue(countLabel) |
156 | 156 |
|
157 | 157 | stackView.addArrangedSubviews([topLabel, countLabel]) |
158 | 158 |
|
@@ -250,13 +250,12 @@ class StatsLatestPostSummaryInsightsCell: StatsBaseCell, LatestPostSummaryConfig |
250 | 250 | // MARK: - Constants |
251 | 251 |
|
252 | 252 | private enum Metrics { |
253 | | - static let outerStackViewSpacing: CGFloat = 16.0 |
254 | | - static let postStackViewHorizontalSpacing: CGFloat = 16.0 |
255 | | - static let postStackViewVerticalSpacing: CGFloat = 8.0 |
256 | | - static let statsStackViewVerticalSpacing: CGFloat = 8.0 |
257 | | - static let createPostButtonInset: CGFloat = 8.0 |
| 253 | + static let outerStackViewSpacing: CGFloat = Length.Padding.double |
| 254 | + static let postStackViewHorizontalSpacing: CGFloat = Length.Padding.double |
| 255 | + static let postStackViewVerticalSpacing: CGFloat = Length.Padding.single |
| 256 | + static let createPostButtonInset: CGFloat = Length.Padding.single |
258 | 257 | static let thumbnailSize: CGFloat = 68.0 |
259 | | - static let thumbnailCornerRadius: CGFloat = 4.0 |
| 258 | + static let thumbnailCornerRadius: CGFloat = Length.Padding.half |
260 | 259 | static let dividerWidth: CGFloat = 1.0 |
261 | 260 | } |
262 | 261 |
|
|
0 commit comments