Skip to content

Commit

Permalink
Merge pull request #193 from V1taS/feature/Sosin_Vitalii/change-lib-v3
Browse files Browse the repository at this point in the history
New lib
  • Loading branch information
V1taS authored Aug 12, 2023
2 parents 38c975f + 832e684 commit 8e463b9
Show file tree
Hide file tree
Showing 35 changed files with 67 additions and 67 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ private extension CoinScreenView {
scrollResult.backgroundColor = .clear
backgroundColor = fancyColor.darkAndLightTheme.primaryWhite

resultLabel.font = RandomFont.primaryBold50
resultLabel.font = fancyFont.primaryBold50
resultLabel.textColor = fancyColor.darkAndLightTheme.primaryGray

generateButton.setTitle(appearance.buttonTitle, for: .normal)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ private extension ColorsScreenView {
backgroundColor = fancyColor.darkAndLightTheme.primaryWhite
showPlugView()

resultLabel.font = RandomFont.primaryBold70
resultLabel.font = fancyFont.primaryBold70
resultLabel.textColor = fancyColor.darkAndLightTheme.primaryGray
resultLabel.textAlignment = .center
resultLabel.numberOfLines = appearance.resultLabelNumberOfLines
Expand Down Expand Up @@ -188,7 +188,7 @@ private extension ColorsScreenView {

func updateResultText(text: String) {
resultLabel.text = text
resultLabel.font = RandomFont.primaryBold50
resultLabel.font = fancyFont.primaryBold50
resultLabel.textColor = fancyColor.only.primaryWhite
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ final class CongratulationsScreenView: CongratulationsScreenViewProtocol {
// MARK: - Internal func

func set(result: String?, type: CongratulationsScreenModel.CongratulationsType) {
let fontSize = Appearance().result == result ? RandomFont.primaryBold50 : RandomFont.primaryBold24
let fontSize = Appearance().result == result ? fancyFont.primaryBold50 : fancyFont.primaryBold24
resultLabel.font = fontSize
resultLabel.text = result

Expand Down Expand Up @@ -149,7 +149,7 @@ private extension CongratulationsScreenView {
let appearance = Appearance()
backgroundColor = fancyColor.darkAndLightTheme.primaryWhite

resultLabel.font = RandomFont.primaryBold24
resultLabel.font = fancyFont.primaryBold24
resultLabel.textColor = fancyColor.darkAndLightTheme.primaryGray
resultLabel.textAlignment = .center
resultLabel.numberOfLines = .zero
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ private extension ContactScreenView {
backgroundColor = fancyColor.darkAndLightTheme.primaryWhite

resultLabel.text = appearance.resultTitle
resultLabel.font = RandomFont.primaryMedium32
resultLabel.font = fancyFont.primaryMedium32
resultLabel.textColor = fancyColor.darkAndLightTheme.primaryGray
resultLabel.textAlignment = .center
resultLabel.numberOfLines = .zero
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ private extension DateTimeView {
backgroundColor = fancyColor.darkAndLightTheme.primaryWhite
isUserInteractionEnabled = true

resultLabel.font = RandomFont.primaryBold50
resultLabel.font = fancyFont.primaryBold50
resultLabel.textColor = fancyColor.darkAndLightTheme.primaryGray
resultLabel.textAlignment = .center

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ extension FortuneWheelEditSectionView: UITableViewDataSource {
cell.configureCellWith(
titleText: text,
textColor: fancyColor.darkAndLightTheme.secondaryGray,
textFont: RandomFont.primaryMedium14,
textFont: fancyFont.primaryMedium14,
textAlignment: .left
)
viewCell = cell
Expand All @@ -225,7 +225,7 @@ extension FortuneWheelEditSectionView: UITableViewDataSource {
cell.configureCellWith(
titleText: object,
textColor: fancyColor.darkAndLightTheme.primaryGray,
textFont: RandomFont.primaryMedium18,
textFont: fancyFont.primaryMedium18,
textAlignment: .center
)
viewCell = cell
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ extension FortuneWheelModel {
colors: nil,
defaultColor: fancyColor.only.primaryWhite
),
font: RandomFont.primaryBold16,
font: fancyFont.primaryBold16,
verticalOffset: 4
)
textPreferences.orientation = .vertical
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ private extension FortuneWheelView {
fortuneWheel?.layer.shouldRasterize = true
fortuneWheel?.layer.rasterizationScale = UIScreen.main.scale

resultLabel.font = RandomFont.primaryBold32
resultLabel.font = fancyFont.primaryBold32
resultLabel.textColor = fancyColor.darkAndLightTheme.primaryGray
resultLabel.text = "?"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ extension FortuneWheelSelectedSectionView: UITableViewDataSource {
cell.configureCellWith(
titleText: text,
textColor: fancyColor.darkAndLightTheme.secondaryGray,
textFont: RandomFont.primaryMedium14,
textFont: fancyFont.primaryMedium14,
textAlignment: .left
)
viewCell = cell
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ private extension GiftsScreenView {
let appearance = Appearance()
backgroundColor = fancyColor.darkAndLightTheme.primaryWhite

resultLabel.font = RandomFont.primaryBold24
resultLabel.font = fancyFont.primaryBold24
resultLabel.textColor = fancyColor.darkAndLightTheme.primaryGray
resultLabel.textAlignment = .center
resultLabel.numberOfLines = .zero
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ final class GoodDeedsScreenView: GoodDeedsScreenViewProtocol {
// MARK: - Internal func

func set(result: String?) {
let fontSize = Appearance().result == result ? RandomFont.primaryBold50 : RandomFont.primaryBold24
let fontSize = Appearance().result == result ? fancyFont.primaryBold50 : fancyFont.primaryBold24
resultLabel.font = fontSize
resultLabel.text = result

Expand Down Expand Up @@ -122,7 +122,7 @@ private extension GoodDeedsScreenView {
let appearance = Appearance()
backgroundColor = fancyColor.darkAndLightTheme.primaryWhite

resultLabel.font = RandomFont.primaryBold24
resultLabel.font = fancyFont.primaryBold24
resultLabel.textColor = fancyColor.darkAndLightTheme.primaryGray
resultLabel.textAlignment = .center
resultLabel.numberOfLines = .zero
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ final class JokeGeneratorScreenView: JokeGeneratorScreenViewProtocol {
// MARK: - Internal func

func set(result: String?) {
let fontSize = Appearance().result == result ? RandomFont.primaryBold50 : RandomFont.primaryBold24
let fontSize = Appearance().result == result ? fancyFont.primaryBold50 : fancyFont.primaryBold24
resultLabel.font = fontSize
resultLabel.text = result

Expand Down Expand Up @@ -122,7 +122,7 @@ private extension JokeGeneratorScreenView {
let appearance = Appearance()
backgroundColor = fancyColor.darkAndLightTheme.primaryWhite

resultLabel.font = RandomFont.primaryBold24
resultLabel.font = fancyFont.primaryBold24
resultLabel.textColor = fancyColor.darkAndLightTheme.primaryGray
resultLabel.textAlignment = .center
resultLabel.numberOfLines = .zero
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ private extension LetterScreenView {
let appearance = Appearance()
backgroundColor = fancyColor.darkAndLightTheme.primaryWhite

resultLabel.font = RandomFont.primaryBold70
resultLabel.font = fancyFont.primaryBold70
resultLabel.textColor = fancyColor.darkAndLightTheme.primaryGray

generateButton.setTitle(appearance.buttonTitle, for: .normal)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ extension ListAddItemsScreenView: UITableViewDataSource {
cell.configureCellWith(
titleText: result.text,
textColor: fancyColor.darkAndLightTheme.primaryGray,
textFont: RandomFont.primaryMedium18,
textFont: fancyFont.primaryMedium18,
textAlignment: .left
)
viewCell = cell
Expand Down Expand Up @@ -167,10 +167,10 @@ extension ListAddItemsScreenView: UITableViewDataSource {
cell.configureCellWith(
primaryText: "\(appearance.allItemTitle): \(textCount)",
primaryTextColor: fancyColor.darkAndLightTheme.primaryGray,
primaryTextFont: RandomFont.primaryMedium10,
primaryTextFont: fancyFont.primaryMedium10,
secondaryText: nil,
secondaryTextColor: fancyColor.darkAndLightTheme.primaryGray,
secondaryTextFont: RandomFont.primaryMedium10
secondaryTextFont: fancyFont.primaryMedium10
)
viewCell = cell
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ private extension ListScreenView {
backgroundColor = fancyColor.darkAndLightTheme.primaryWhite

resultTextView.textColor = fancyColor.darkAndLightTheme.primaryGray
resultTextView.font = RandomFont.primaryMedium32
resultTextView.font = fancyFont.primaryMedium32
resultTextView.textAlignment = .center
resultTextView.isEditable = false
resultTextView.isSelectable = false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ private extension LotteryScreenView {
amountNumberTextField.layer.borderColor = fancyColor.darkAndLightTheme.secondaryGray.cgColor
isUserInteractionEnabled = true

resultTextView.font = RandomFont.primaryBold50
resultTextView.font = fancyFont.primaryBold50
resultTextView.textColor = fancyColor.darkAndLightTheme.primaryGray
resultTextView.textAlignment = .center
resultTextView.isEditable = false
Expand Down Expand Up @@ -156,19 +156,19 @@ private extension LotteryScreenView {
generateButton.addTarget(self, action: #selector(generateButtonAction), for: .touchUpInside)

amountNumberLabel.textColor = fancyColor.darkAndLightTheme.primaryGray
amountNumberLabel.font = RandomFont.primaryRegular18
amountNumberLabel.font = fancyFont.primaryRegular18
amountNumberLabel.text = appearance.textAmountLabel + ":"

amountNumberTextField.placeholder = appearance.startPlaceholder
amountNumberTextField.keyboardType = .numberPad
amountNumberTextField.delegate = self

rangeNumberLabel.font = RandomFont.primaryRegular18
rangeNumberLabel.font = fancyFont.primaryRegular18
rangeNumberLabel.textColor = fancyColor.darkAndLightTheme.primaryGray
rangeNumberLabel.setContentHuggingPriority(.defaultHigh, for: .horizontal)
rangeNumberLabel.text = appearance.textRangeLabel + ":"

betweenRangeLabel.font = RandomFont.primaryMedium18
betweenRangeLabel.font = fancyFont.primaryMedium18
betweenRangeLabel.textColor = fancyColor.darkAndLightTheme.primaryGray
betweenRangeLabel.text = appearance.separatorTitle

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ private extension NamesScreenView {
let appearance = Appearance()
backgroundColor = fancyColor.darkAndLightTheme.primaryWhite

resultLabel.font = RandomFont.primaryBold50
resultLabel.font = fancyFont.primaryBold50
resultLabel.textColor = fancyColor.darkAndLightTheme.primaryGray
resultLabel.textAlignment = .center
resultLabel.numberOfLines = .zero
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ private extension NickNameScreenView {
let appearance = Appearance()
backgroundColor = fancyColor.darkAndLightTheme.primaryWhite

resultLabel.font = RandomFont.primaryBold50
resultLabel.font = fancyFont.primaryBold50
resultLabel.textColor = fancyColor.darkAndLightTheme.primaryGray
resultLabel.textAlignment = .center
resultLabel.numberOfLines = appearance.numberOfLines
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ private extension NumberScreenView {
rangeEndTextField.layer.borderColor = fancyColor.darkAndLightTheme.secondaryGray.cgColor
backgroundColor = fancyColor.darkAndLightTheme.primaryWhite

resultLabel.font = RandomFont.primaryBold70
resultLabel.font = fancyFont.primaryBold70
resultLabel.textColor = fancyColor.darkAndLightTheme.primaryGray
resultLabel.textAlignment = .center
resultLabel.numberOfLines = .zero
Expand All @@ -166,11 +166,11 @@ private extension NumberScreenView {

rangeStartLabel.text = appearance.min
rangeStartLabel.textColor = fancyColor.darkAndLightTheme.primaryGray
rangeStartLabel.font = RandomFont.primaryMedium18
rangeStartLabel.font = fancyFont.primaryMedium18

rangeEndLabel.text = appearance.max
rangeEndLabel.textColor = fancyColor.darkAndLightTheme.primaryGray
rangeEndLabel.font = RandomFont.primaryMedium18
rangeEndLabel.font = fancyFont.primaryMedium18

let tap = UITapGestureRecognizer(target: self, action: #selector(UIView.endEditing))
tap.cancelsTouchesInView = false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ private extension PasswordGeneratorView {
func applyDefaultBehavior() {
let appearance = Appearance()

crackTimeLabel.font = RandomFont.primaryBold18
crackTimeLabel.font = fancyFont.primaryBold18
crackTimeLabel.numberOfLines = 2
crackTimeLabel.textAlignment = .center
crackTimeLabel.textColor = fancyColor.darkAndLightTheme.primaryGray
Expand All @@ -212,7 +212,7 @@ private extension PasswordGeneratorView {

settingOptionsLabel.text = appearance.parameters + ":"
settingOptionsLabel.textColor = fancyColor.darkAndLightTheme.primaryGray
settingOptionsLabel.font = RandomFont.primaryBold18
settingOptionsLabel.font = fancyFont.primaryBold18
settingOptionsLabel.numberOfLines = 1

labelsStackView.axis = .vertical
Expand All @@ -221,19 +221,19 @@ private extension PasswordGeneratorView {

uppercaseLettersLabel.text = appearance.uppercase
uppercaseLettersLabel.textColor = fancyColor.darkAndLightTheme.primaryGray
uppercaseLettersLabel.font = RandomFont.primaryMedium18
uppercaseLettersLabel.font = fancyFont.primaryMedium18

lowercaseLettersLabel.text = appearance.lovercase
lowercaseLettersLabel.textColor = fancyColor.darkAndLightTheme.primaryGray
lowercaseLettersLabel.font = RandomFont.primaryMedium18
lowercaseLettersLabel.font = fancyFont.primaryMedium18

numbersLabel.text = appearance.numbers
numbersLabel.textColor = fancyColor.darkAndLightTheme.primaryGray
numbersLabel.font = RandomFont.primaryMedium18
numbersLabel.font = fancyFont.primaryMedium18

symbolsLabel.text = appearance.symbols
symbolsLabel.textColor = fancyColor.darkAndLightTheme.primaryGray
symbolsLabel.font = RandomFont.primaryMedium18
symbolsLabel.font = fancyFont.primaryMedium18

switchersStackView.axis = .vertical
switchersStackView.alignment = .trailing
Expand Down Expand Up @@ -261,7 +261,7 @@ private extension PasswordGeneratorView {

passwordLengthLabel.text = appearance.longPassword + ":"
passwordLengthLabel.textColor = fancyColor.darkAndLightTheme.primaryGray
passwordLengthLabel.font = RandomFont.primaryBold18
passwordLengthLabel.font = fancyFont.primaryBold18

textFieldStackView.axis = .horizontal
textFieldStackView.spacing = appearance.defaultSpacing
Expand All @@ -273,7 +273,7 @@ private extension PasswordGeneratorView {
passwordLengthTextField.keyboardType = .numberPad

resultTextView.backgroundColor = fancyColor.darkAndLightTheme.primaryWhite
resultTextView.font = RandomFont.primaryMedium24
resultTextView.font = fancyFont.primaryMedium24
resultTextView.textAlignment = .center
resultTextView.isEditable = false
resultTextView.isSelectable = false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ private extension PasswordScreenView {
DispatchQueue.main.async {
let passwordAttributed = NSMutableAttributedString(
string: password,
attributes: [NSAttributedString.Key.font: RandomFont.primaryMedium24])
attributes: [NSAttributedString.Key.font: fancyFont.primaryMedium24])
let paragraphStyle = NSMutableParagraphStyle()
paragraphStyle.alignment = .center
passwordAttributed.addAttributes([.paragraphStyle: paragraphStyle], range: NSRange(location: .zero,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ final class QuotesScreenView: QuotesScreenViewProtocol {
// MARK: - Internal func

func set(result: String?) {
let fontSize = Appearance().result == result ? RandomFont.primaryBold50 : RandomFont.primaryBold24
let fontSize = Appearance().result == result ? fancyFont.primaryBold50 : fancyFont.primaryBold24
resultLabel.font = fontSize

resultLabel.text = result
Expand Down Expand Up @@ -122,7 +122,7 @@ private extension QuotesScreenView {
let appearance = Appearance()
backgroundColor = fancyColor.darkAndLightTheme.primaryWhite

resultLabel.font = RandomFont.primaryBold24
resultLabel.font = fancyFont.primaryBold24
resultLabel.textColor = fancyColor.darkAndLightTheme.primaryGray
resultLabel.textAlignment = .center
resultLabel.numberOfLines = appearance.numberOfLines
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ final class RiddlesScreenView: RiddlesScreenViewProtocol {

func set(riddles: RiddlesScreenModel.Riddles,
type: RiddlesScreenModel.DifficultType) {
let fontSize = Appearance().result == riddles.question ? RandomFont.primaryBold50 : RandomFont.primaryBold24
let fontSize = Appearance().result == riddles.question ? fancyFont.primaryBold50 : fancyFont.primaryBold24
resultLabel.font = fontSize
resultLabel.text = riddles.question

Expand Down Expand Up @@ -151,7 +151,7 @@ private extension RiddlesScreenView {
let appearance = Appearance()
backgroundColor = fancyColor.darkAndLightTheme.primaryWhite

resultLabel.font = RandomFont.primaryBold24
resultLabel.font = fancyFont.primaryBold24
resultLabel.textColor = fancyColor.darkAndLightTheme.primaryGray
resultLabel.textAlignment = .center
resultLabel.numberOfLines = .zero
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ final class SlogansScreenView: SlogansScreenViewProtocol {
// MARK: - Internal func

func set(result: String?) {
let fontSize = Appearance().result == result ? RandomFont.primaryBold50 : RandomFont.primaryBold24
let fontSize = Appearance().result == result ? fancyFont.primaryBold50 : fancyFont.primaryBold24
resultLabel.font = fontSize
resultLabel.text = result

Expand Down Expand Up @@ -122,7 +122,7 @@ private extension SlogansScreenView {
let appearance = Appearance()
backgroundColor = fancyColor.darkAndLightTheme.primaryWhite

resultLabel.font = RandomFont.primaryBold24
resultLabel.font = fancyFont.primaryBold24
resultLabel.textColor = fancyColor.darkAndLightTheme.primaryGray
resultLabel.textAlignment = .center
resultLabel.numberOfLines = .zero
Expand Down
Loading

0 comments on commit 8e463b9

Please sign in to comment.