improve code style
This commit is contained in:
@@ -31,7 +31,7 @@ extension PHTheme {
|
||||
}
|
||||
|
||||
/// Load the bundled theme.
|
||||
/// If the theme doesn't exist or fails to parse, the execution is interrupted.
|
||||
/// If the file doesn't exist or fails to parse, the execution is interrupted.
|
||||
static private func loadFromBundle() throws -> PHTheme {
|
||||
guard
|
||||
let defaultConfig = Bundle.module.url(
|
||||
|
||||
@@ -3,12 +3,12 @@ import SwiftUI
|
||||
struct PHThemeColor: Decodable, ShapeStyle {
|
||||
typealias Resolved = SwiftUI.Color
|
||||
|
||||
let color: String
|
||||
let alpha: Double?
|
||||
let color: String
|
||||
let alpha: Double?
|
||||
|
||||
var uiColor: SwiftUI.Color {
|
||||
SwiftUI.Color(hex: color, opacity: alpha)
|
||||
}
|
||||
var uiColor: SwiftUI.Color {
|
||||
SwiftUI.Color(hex: color, opacity: alpha)
|
||||
}
|
||||
|
||||
var nsColor: NSColor? {
|
||||
guard let cgColor else { return nil }
|
||||
|
||||
Reference in New Issue
Block a user