diff --git a/Sources/phbar/Models/PHTheme/PHThemeStyle.swift b/Sources/phbar/Models/PHTheme/PHThemeStyle.swift index 9f51b5b..529aea4 100644 --- a/Sources/phbar/Models/PHTheme/PHThemeStyle.swift +++ b/Sources/phbar/Models/PHTheme/PHThemeStyle.swift @@ -9,7 +9,7 @@ struct PHThemeStyle: Decodable { name: "_default", foreground: .init(color: "#000000", alpha: nil), background: .init(color: "#ffffff", alpha: nil), - padding: .init(trailing: 12, leading: 12) + padding: .init(leading: 12, trailing: 12) ) }() } diff --git a/Sources/phbar/Models/PHTheme/PHThemeStyle/PHThemeStylePadding.swift b/Sources/phbar/Models/PHTheme/PHThemeStyle/PHThemeStylePadding.swift index 3fd8219..de71a56 100644 --- a/Sources/phbar/Models/PHTheme/PHThemeStyle/PHThemeStylePadding.swift +++ b/Sources/phbar/Models/PHTheme/PHThemeStyle/PHThemeStylePadding.swift @@ -1,9 +1,9 @@ struct PHThemeStylePadding: Decodable { - let trailing: Double? let leading: Double? + let trailing: Double? private enum CodingKeys: String, CodingKey { - case trailing = "right" case leading = "left" + case trailing = "right" } } diff --git a/Sources/phbar/Models/PHTheme/PHThemeWindow/PHThemeWindowAnchor.swift b/Sources/phbar/Models/PHTheme/PHThemeWindow/PHThemeWindowAnchor.swift index 44c71d0..89dac42 100644 --- a/Sources/phbar/Models/PHTheme/PHThemeWindow/PHThemeWindowAnchor.swift +++ b/Sources/phbar/Models/PHTheme/PHThemeWindow/PHThemeWindowAnchor.swift @@ -8,10 +8,10 @@ import Foundation /// `center` centers the window on both axes. enum PHThemeWindowAnchor: String, Decodable { case top, bottom, leading, trailing - case topLeading = "top-leading" - case topTrailing = "top-trailing" - case bottomLeading = "bottom-leading" - case bottomTrailing = "bottom-trailing" + case topLeading = "top-left" + case topTrailing = "top-right" + case bottomLeading = "bottom-left" + case bottomTrailing = "bottom-right" case center } diff --git a/Sources/phbar/Models/PHTheme/PHThemeWindow/PHThemeWindowMargin.swift b/Sources/phbar/Models/PHTheme/PHThemeWindow/PHThemeWindowMargin.swift index e157f18..8fb993e 100644 --- a/Sources/phbar/Models/PHTheme/PHThemeWindow/PHThemeWindowMargin.swift +++ b/Sources/phbar/Models/PHTheme/PHThemeWindow/PHThemeWindowMargin.swift @@ -13,6 +13,13 @@ struct PHThemeWindowMargin: Decodable, Equatable { let leading: Double? let trailing: Double? + private enum CodingKeys: String, CodingKey { + case top + case bottom + case leading = "left" + case trailing = "right" + } + init( top: Double? = nil, bottom: Double? = nil,