mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-08-01 07:57:01 +00:00

git-subtree-dir: submodules/Display git-subtree-mainline: 9bc996374ffdad37aef175427db72731c9551dcf git-subtree-split: 7bd11013ea936e3d49d937550d599f5816d32560
88 lines
3.5 KiB
Swift
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
|
|
}
|
|
}
|