Swiftgram/submodules/Display/Display/ActionSheetTheme.swift
Peter 8f5a4f7dc1 Add 'submodules/Display/' from commit '7bd11013ea936e3d49d937550d599f5816d32560'
git-subtree-dir: submodules/Display
git-subtree-mainline: 9bc996374ffdad37aef175427db72731c9551dcf
git-subtree-split: 7bd11013ea936e3d49d937550d599f5816d32560
2019-06-11 18:44:37 +01:00

88 lines
3.5 KiB
Swift

import Foundation
import UIKit
public enum ActionSheetControllerThemeBackgroundType {
case light
case dark
}
public final class ActionSheetControllerTheme: Equatable {
public let dimColor: UIColor
public let backgroundType: ActionSheetControllerThemeBackgroundType
public let itemBackgroundColor: UIColor
public let itemHighlightedBackgroundColor: UIColor
public let standardActionTextColor: UIColor
public let destructiveActionTextColor: UIColor
public let disabledActionTextColor: UIColor
public let primaryTextColor: UIColor
public let secondaryTextColor: UIColor
public let controlAccentColor: UIColor
public let controlColor: UIColor
public let switchFrameColor: UIColor
public let switchContentColor: UIColor
public let switchHandleColor: UIColor
public init(dimColor: UIColor, backgroundType: ActionSheetControllerThemeBackgroundType, itemBackgroundColor: UIColor, itemHighlightedBackgroundColor: UIColor, standardActionTextColor: UIColor, destructiveActionTextColor: UIColor, disabledActionTextColor: UIColor, primaryTextColor: UIColor, secondaryTextColor: UIColor, controlAccentColor: UIColor, controlColor: UIColor, switchFrameColor: UIColor, switchContentColor: UIColor, switchHandleColor: UIColor) {
self.dimColor = dimColor
self.backgroundType = backgroundType
self.itemBackgroundColor = itemBackgroundColor
self.itemHighlightedBackgroundColor = itemHighlightedBackgroundColor
self.standardActionTextColor = standardActionTextColor
self.destructiveActionTextColor = destructiveActionTextColor
self.disabledActionTextColor = disabledActionTextColor
self.primaryTextColor = primaryTextColor
self.secondaryTextColor = secondaryTextColor
self.controlAccentColor = controlAccentColor
self.controlColor = controlColor
self.switchFrameColor = switchFrameColor
self.switchContentColor = switchContentColor
self.switchHandleColor = switchHandleColor
}
public static func ==(lhs: ActionSheetControllerTheme, rhs: ActionSheetControllerTheme) -> Bool {
if lhs.dimColor != rhs.dimColor {
return false
}
if lhs.backgroundType != rhs.backgroundType {
return false
}
if lhs.itemBackgroundColor != rhs.itemBackgroundColor {
return false
}
if lhs.itemHighlightedBackgroundColor != rhs.itemHighlightedBackgroundColor {
return false
}
if lhs.standardActionTextColor != rhs.standardActionTextColor {
return false
}
if lhs.destructiveActionTextColor != rhs.destructiveActionTextColor {
return false
}
if lhs.disabledActionTextColor != rhs.disabledActionTextColor {
return false
}
if lhs.primaryTextColor != rhs.primaryTextColor {
return false
}
if lhs.secondaryTextColor != rhs.secondaryTextColor {
return false
}
if lhs.controlAccentColor != rhs.controlAccentColor {
return false
}
if lhs.controlColor != rhs.controlColor {
return false
}
if lhs.switchFrameColor != rhs.switchFrameColor {
return false
}
if lhs.switchContentColor != rhs.switchContentColor {
return false
}
if lhs.switchHandleColor != rhs.switchHandleColor {
return false
}
return true
}
}