Commit e12bfe61 authored by Olev Abel's avatar Olev Abel
Browse files

COVAPP-537: Fix reapplied

parent 0f797828
This diff is collapsed.
......@@ -74,8 +74,7 @@ private extension CrossCountryPopupView {
newsLabel.attributedText = newsText.withAttributes(
.alignment(.center),
.color(Asset.liivi.color),
.font(.ainoBold(size: NewsLabelStyle.FontSize.medium)),
.lineHeightMultiple(NewsLabelStyle.lineHeightMultiple)
.font(.ainoBold(size: NewsLabelStyle.FontSize.medium))
)
let closeButtonTitle = Strings.Close.label.uppercased()
let attributedButtonTitle = closeButtonTitle.withAttributes(
......@@ -95,7 +94,6 @@ private extension CrossCountryPopupView {
cardView.backgroundColor = .white
let titleText = Strings.Title.label
titleLabel.attributedText = titleText.withAttributes(
.lineHeightMultiple(HeaderLabelStyle.lineHeightMultiple),
.alignment(.center),
.color(.black),
.font(.ainoHeadline(size: HeaderLabelStyle.FontSize.extraLarge))
......@@ -106,8 +104,7 @@ private extension CrossCountryPopupView {
.alignment(.center),
.color(Asset.mustkivi.color),
.font(.ainoRegular(size: SubLabelStyle.FontSize.medium)),
.minimumLineHeight(SubLabelStyle.minimumLineHeight),
.lineHeightMultiple(SubLabelStyle.lineHeightMultiple)
.minimumLineHeight(SubLabelStyle.minimumLineHeight)
)
description1Label.numberOfLines = 0
......@@ -116,8 +113,7 @@ private extension CrossCountryPopupView {
.alignment(.center),
.color(Asset.mustkivi.color),
.font(.ainoRegular(size: SubLabelStyle.FontSize.medium)),
.minimumLineHeight(SubLabelStyle.minimumLineHeight),
.lineHeightMultiple(SubLabelStyle.lineHeightMultiple)
.minimumLineHeight(SubLabelStyle.minimumLineHeight)
)
description2Label.numberOfLines = 0
moveToHomeButton.setTitle(Strings.Button.Move.To.home.uppercased(), for: .normal)
......
......@@ -116,7 +116,6 @@ import UIKit
cell.isHighlighted = status == viewModel.currentOverrideStatus()
cell.textLabel?.attributedText = cellText.withAttributes(
.font(.ainoRegular(size: 16)),
.lineHeightMultiple(1.3),
.minimumLineHeight(24),
.alignment(.left),
.color(.black)
......
......@@ -19,7 +19,6 @@ final class ErrorView: UIView {
didSet {
errorMessageLabel.attributedText = errorMessage?.withAttributes(
.font(.ainoRegular(size: DescriptionStyle.FontSize.medium)),
.lineHeightMultiple(DescriptionStyle.lineHeightMultiple),
.color(Asset.mustkivi.color),
.minimumLineHeight(DescriptionStyle.minimumLineHeight)
)
......@@ -127,8 +126,7 @@ final class ErrorView: UIView {
let headerLabel = UILabel()
headerLabel.numberOfLines = 0
headerLabel.attributedText = Strings.errorHeading.withAttributes(
.font(.ainoBold(size: SubLabelStyle.FontSize.medium)),
.lineHeightMultiple(SubLabelStyle.lineHeightMultiple)
.font(.ainoBold(size: SubLabelStyle.FontSize.medium))
)
versionLabel.layoutMargins = StackViewStyle.margins
......@@ -156,8 +154,7 @@ final class ErrorView: UIView {
let label = UILabel()
label.attributedText = Strings.title.withAttributes(
.color(.white),
.font(.ainoHeadline(size: HeaderLabelStyle.FontSize.large)),
.lineHeightMultiple(HeaderLabelStyle.lineHeightMultiple)
.font(.ainoHeadline(size: HeaderLabelStyle.FontSize.large))
)
let stackView = UIStackView(arrangedSubviews: [icon, label])
......
......@@ -2,7 +2,6 @@ import UIKit
extension String {
public enum Attribute {
case lineHeightMultiple(CGFloat)
case alignment(NSTextAlignment)
case font(UIFont)
case kern(CGFloat)
......@@ -16,9 +15,6 @@ extension String {
var attributesDic = [NSAttributedString.Key: Any]()
attributes.forEach {
switch $0 {
case let .lineHeightMultiple(value):
paragraphStyle.lineHeightMultiple = value
case let .alignment(alignment):
paragraphStyle.alignment = alignment
......
......@@ -56,7 +56,6 @@ final class HomeSectionView: UIView {
let titleAttributedString = title.map {
NSMutableAttributedString(attributedString: $0
.withAttributes(.font(.ainoRegular(size: LocalStyle.Title.fontSize)),
.lineHeightMultiple(LocalStyle.Title.lineHeightMultiple),
.color(style.textColor)))
}
titleView.setTitle(title: titleAttributedString)
......@@ -76,7 +75,6 @@ final class HomeSectionView: UIView {
let attributedString = description.map {
NSMutableAttributedString(attributedString: $0.withAttributes(
.font(.ainoRegular(size: SubLabelStyle.FontSize.medium)),
.lineHeightMultiple(SubLabelStyle.lineHeightMultiple),
.color(Asset.mustkivi.color)
))
}
......
......@@ -155,8 +155,7 @@ private extension InfectionDateView {
text.withAttributes(
.alignment(alignment),
.color(Asset.mustkivi.color),
.font(.ainoRegular(size: SubLabelStyle.FontSize.medium)),
.lineHeightMultiple(SubLabelStyle.lineHeightMultiple)
.font(.ainoRegular(size: SubLabelStyle.FontSize.medium))
)
}
......
......@@ -131,7 +131,6 @@ private extension PreshareView {
UILabel().adjust {
$0.numberOfLines = 0
$0.attributedText = text.withAttributes(
.lineHeightMultiple(HeaderLabelStyle.lineHeightMultiple),
.alignment(.center),
.color(Asset.mustkivi.color),
.font(.ainoHeadline(size: HeaderLabelStyle.FontSize.extraLarge))
......@@ -143,7 +142,6 @@ private extension PreshareView {
UILabel().adjust {
$0.numberOfLines = 0
$0.attributedText = text.withAttributes(
.lineHeightMultiple(SubLabelStyle.lineHeightMultiple),
.alignment(.center),
.color(Asset.mustkivi.color),
.font(.ainoBold(size: SubLabelStyle.FontSize.large))
......@@ -155,7 +153,6 @@ private extension PreshareView {
UILabel().adjust {
$0.numberOfLines = 0
$0.attributedText = text.withAttributes(
.lineHeightMultiple(SubLabelStyle.lineHeightMultiple),
.alignment(.center),
.color(Asset.mustkivi.color),
.font(.ainoRegular(size: SubLabelStyle.FontSize.medium))
......
......@@ -107,7 +107,6 @@ private extension ConfirmInfectionResultView {
text.withAttributes(
.font(.ainoRegular(size: SubLabelStyle.FontSize.medium)),
.alignment(.center),
.lineHeightMultiple(SubLabelStyle.lineHeightMultiple),
.color(.white)
)
}
......@@ -138,7 +137,6 @@ private extension ConfirmInfectionResultView {
$0.attributedText = text.withAttributes(
.font(.ainoHeadline(size: HeaderLabelStyle.FontSize.extraLarge)),
.alignment(.center),
.lineHeightMultiple(HeaderLabelStyle.lineHeightMultiple),
.color(.white)
)
......
......@@ -46,14 +46,12 @@ final class ShareErrorView: UIView {
titleLabel.attributedText = Strings.title.withAttributes(
.color(.white),
.alignment(.center),
.font(.ainoHeadline(size: HeaderLabelStyle.FontSize.large)),
.lineHeightMultiple(HeaderLabelStyle.lineHeightMultiple)
.font(.ainoHeadline(size: HeaderLabelStyle.FontSize.large))
)
titleLabel.numberOfLines = 0
errorDescriptionLabel.numberOfLines = 0
errorDescriptionLabel.attributedText = Strings.description.withAttributes(
.lineHeightMultiple(SubLabelStyle.lineHeightMultiple),
.alignment(.left),
.color(Asset.mustkivi.color),
.font(.ainoRegular(size: SubLabelStyle.FontSize.medium))
......@@ -61,7 +59,6 @@ final class ShareErrorView: UIView {
errorDescriptionLabel2.numberOfLines = 0
errorDescriptionLabel2.attributedText = Strings.description2.withAttributes(
.lineHeightMultiple(SubLabelStyle.lineHeightMultiple),
.alignment(.left),
.color(Asset.mustkivi.color),
.font(.ainoRegular(size: SubLabelStyle.FontSize.medium))
......
......@@ -63,8 +63,7 @@ class MyContactsView: UIView {
titleLabel.attributedText = title.withAttributes(
.alignment(.center),
.color(.white),
.font(.ainoHeadline(size: HeaderLabelStyle.FontSize.large)),
.lineHeightMultiple(HeaderLabelStyle.lineHeightMultiple)
.font(.ainoHeadline(size: HeaderLabelStyle.FontSize.large))
)
stayHomeLabel.label
......@@ -84,7 +83,6 @@ class MyContactsView: UIView {
let buttonTitle = Strings.back.withAttributes(
.color(Asset.estonianBlue.color),
.lineHeightMultiple(ButtonStyle.lineHeightMultiple),
.font(.ainoBold(size: ButtonStyle.fontSize))
)
backButton.setAttributedTitle(buttonTitle, for: .normal)
......@@ -102,7 +100,6 @@ class MyContactsView: UIView {
$0.numberOfLines = 0
$0.attributedText = Strings.healthBoardThankYou.withAttributes(
.font(.ainoBold(size: SubLabelStyle.FontSize.medium)),
.lineHeightMultiple(SubLabelStyle.lineHeightMultiple),
.minimumLineHeight(SubLabelStyle.minimumLineHeight),
.color(.black),
.alignment(.center)
......
......@@ -52,7 +52,6 @@ private extension MyDataView {
UILabel().adjust {
$0.attributedText = Strings.title.withAttributes(
.lineHeightMultiple(HeaderLabelStyle.lineHeightMultiple),
.alignment(.center),
.color(.black),
.font(.ainoHeadline(size: HeaderLabelStyle.FontSize.extraLarge))
......
......@@ -40,21 +40,18 @@ class ConfigureView: CustomView {
func updateTexts() {
titleLabel.attributedText = Strings.title.withAttributes(
.lineHeightMultiple(HeaderLabelStyle.lineHeightMultiple),
.alignment(.center),
.color(.black),
.font(.ainoHeadline(size: HeaderLabelStyle.FontSize.extraLarge))
)
subtitleLabel.attributedText = Strings.subtitle.withAttributes(
.lineHeightMultiple(SubLabelStyle.lineHeightMultiple),
.alignment(.center),
.color(.black),
.font(.ainoBold(size: SubLabelStyle.FontSize.large))
)
messageLabel.attributedText = Strings.message.withAttributes(
.lineHeightMultiple(SubLabelStyle.lineHeightMultiple),
.alignment(.center),
.color(Asset.mustkivi.color),
.font(.ainoRegular(size: SubLabelStyle.FontSize.medium))
......
......@@ -25,7 +25,6 @@ class IntroCompleteView: UIView {
private func setup() {
titleLabel.attributedText = Strings.title.withAttributes(
.lineHeightMultiple(HeaderLabelStyle.lineHeightMultiple),
.alignment(.center),
.color(.white),
.font(.ainoHeadline(size: HeaderLabelStyle.FontSize.extraLarge))
......@@ -33,7 +32,6 @@ class IntroCompleteView: UIView {
titleLabel.accessibilityTraits = .header
subtitleLabel.attributedText = Strings.subtitle.withAttributes(
.lineHeightMultiple(HeaderLabelStyle.lineHeightMultiple),
.alignment(.center),
.color(.white),
.font(.ainoHeadline(size: HeaderLabelStyle.FontSize.medium))
......
......@@ -37,14 +37,12 @@ final class IntroView: CustomView {
func updateTexts() {
titleLabel.attributedText = Strings.title.withAttributes(
.lineHeightMultiple(HeaderLabelStyle.lineHeightMultiple),
.alignment(.center),
.color(.black),
.font(.ainoHeadline(size: HeaderLabelStyle.FontSize.extraLarge))
)
messageLabel.attributedText = Strings.message.withAttributes(
.lineHeightMultiple(SubLabelStyle.lineHeightMultiple),
.alignment(.center),
.color(Asset.mustkivi.color),
.font(.ainoRegular(size: SubLabelStyle.FontSize.medium))
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment