From ac06d2ccdec8ffe32965700ac0bc21c4352ae8b5 Mon Sep 17 00:00:00 2001 From: Davide De Rosa Date: Mon, 15 Oct 2018 00:12:37 +0200 Subject: [PATCH] Group accessory color with less alpha --- Passepartout-iOS/Global/Theme+Cells.swift | 2 +- Passepartout-iOS/Global/Theme.swift | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Passepartout-iOS/Global/Theme+Cells.swift b/Passepartout-iOS/Global/Theme+Cells.swift index 3afaa488..b19203cb 100644 --- a/Passepartout-iOS/Global/Theme+Cells.swift +++ b/Passepartout-iOS/Global/Theme+Cells.swift @@ -28,7 +28,7 @@ import UIKit extension UITableViewCell { func applyChecked(_ checked: Bool, _ theme: Theme) { accessoryType = checked ? .checkmark : .none - tintColor = Theme.current.palette.colorAction.withAlphaComponent(0.7) + tintColor = Theme.current.palette.colorAccessory } } diff --git a/Passepartout-iOS/Global/Theme.swift b/Passepartout-iOS/Global/Theme.swift index 05683c03..13fe5af8 100644 --- a/Passepartout-iOS/Global/Theme.swift +++ b/Passepartout-iOS/Global/Theme.swift @@ -64,6 +64,10 @@ struct Theme { return colorAccent1 } + var colorAccessory: UIColor { + return colorAccent1.withAlphaComponent(0.7) + } + var colorDestructive = UIColor(red: 0.8, green: 0.27, blue: 0.2, alpha: 1.0) } @@ -95,7 +99,7 @@ extension Theme { toolbar.tintColor = palette.colorPrimaryLightText let toggle = UISwitch.appearance() - toggle.onTintColor = palette.colorAction.withAlphaComponent(0.7) + toggle.onTintColor = palette.colorAccessory } }