metatext/Views/ViewConstants.swift

34 lines
1,002 B
Swift
Raw Normal View History

2020-09-29 01:14:43 +00:00
// Copyright © 2020 Metabolist. All rights reserved.
import SwiftUI
extension CGFloat {
static let defaultSpacing: Self = 8
static let compactSpacing: Self = 4
2020-10-29 06:03:45 +00:00
static let ultraCompactSpacing: Self = 1
2020-09-29 01:14:43 +00:00
static let defaultCornerRadius: Self = 8
2020-10-12 05:37:34 +00:00
static let avatarDimension: Self = 50
2020-10-04 08:39:54 +00:00
static let hairline = 1 / UIScreen.main.scale
2020-10-12 05:37:34 +00:00
static let minimumButtonDimension: Self = 44
2020-12-10 02:44:06 +00:00
static let barButtonItemDimension: Self = 28
2020-12-11 02:51:08 +00:00
static let newStatusButtonDimension: CGFloat = 54
2021-01-10 01:26:51 +00:00
static let defaultShadowRadius: CGFloat = 2
2020-09-29 01:14:43 +00:00
}
2021-01-04 07:17:38 +00:00
extension CGRect {
static let defaultContentsRect = Self(origin: .zero, size: .init(width: 1, height: 1))
}
2020-09-29 01:32:28 +00:00
extension TimeInterval {
static let defaultAnimationDuration: Self = 0.5
2020-10-21 08:07:13 +00:00
static let shortAnimationDuration = defaultAnimationDuration / 2
2020-09-29 01:32:28 +00:00
}
2020-09-29 01:14:43 +00:00
extension UIImage {
static let highlightedButtonBackground = UIColor(white: 0, alpha: 0.5).image()
}
2020-10-12 05:37:34 +00:00
extension UILayoutPriority {
static let justBelowMax: Self = .init(999)
}