diff options
| -rw-r--r-- | ios/MullvadVPN/UI appearance/UIColor+Palette.swift | 2 | ||||
| -rw-r--r-- | ios/MullvadVPN/Views/AppButton.swift | 6 | ||||
| -rw-r--r-- | ios/MullvadVPN/Views/CustomButton.swift | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/ios/MullvadVPN/UI appearance/UIColor+Palette.swift b/ios/MullvadVPN/UI appearance/UIColor+Palette.swift index 38749d6706..9d5cfe84bc 100644 --- a/ios/MullvadVPN/UI appearance/UIColor+Palette.swift +++ b/ios/MullvadVPN/UI appearance/UIColor+Palette.swift @@ -50,7 +50,7 @@ extension UIColor { enum AppButton { static let normalTitleColor = UIColor.white static let highlightedTitleColor = UIColor.lightGray - static let disabledTitleColor = UIColor.lightGray + static let disabledTitleColor = UIColor.white.withAlphaComponent(0.2) } enum Switch { diff --git a/ios/MullvadVPN/Views/AppButton.swift b/ios/MullvadVPN/Views/AppButton.swift index 022bd97b13..a5c092d4db 100644 --- a/ios/MullvadVPN/Views/AppButton.swift +++ b/ios/MullvadVPN/Views/AppButton.swift @@ -113,15 +113,15 @@ class AppButton: CustomButton { config.background.image = style.backgroundImage config.background.imageContentMode = .scaleAspectFill config.titleTextAttributesTransformer = - UIConfigurationTextAttributesTransformer { attributeContainer in + UIConfigurationTextAttributesTransformer { [weak self] attributeContainer in var updatedAttributeContainer = attributeContainer updatedAttributeContainer.font = UIFont.systemFont(ofSize: 18, weight: .semibold) + updatedAttributeContainer.foregroundColor = self?.state.customButtonTitleColor return updatedAttributeContainer } - let configurationHandler: UIButton.ConfigurationUpdateHandler = { [weak self] button in + let configurationHandler: UIButton.ConfigurationUpdateHandler = { [weak self] _ in guard let self else { return } - button.configuration?.baseForegroundColor = button.state.customButtonTitleColor updateButtonBackground() } configuration = config diff --git a/ios/MullvadVPN/Views/CustomButton.swift b/ios/MullvadVPN/Views/CustomButton.swift index a956025f28..8c99ddb2cc 100644 --- a/ios/MullvadVPN/Views/CustomButton.swift +++ b/ios/MullvadVPN/Views/CustomButton.swift @@ -14,7 +14,7 @@ extension UIControl.State { case .normal: return UIColor.AppButton.normalTitleColor case .disabled: - return UIColor.AppButton.disabledTitleColor.withAlphaComponent(0.5) + return UIColor.AppButton.disabledTitleColor case .highlighted: return UIColor.AppButton.highlightedTitleColor default: |
