rename leading and trailing externally in left and right

This commit is contained in:
2026-07-12 16:50:18 +02:00
parent d4d1b7bec4
commit 77717c9654
4 changed files with 14 additions and 7 deletions
@@ -9,7 +9,7 @@ struct PHThemeStyle: Decodable {
name: "_default", name: "_default",
foreground: .init(color: "#000000", alpha: nil), foreground: .init(color: "#000000", alpha: nil),
background: .init(color: "#ffffff", alpha: nil), background: .init(color: "#ffffff", alpha: nil),
padding: .init(trailing: 12, leading: 12) padding: .init(leading: 12, trailing: 12)
) )
}() }()
} }
@@ -1,9 +1,9 @@
struct PHThemeStylePadding: Decodable { struct PHThemeStylePadding: Decodable {
let trailing: Double?
let leading: Double? let leading: Double?
let trailing: Double?
private enum CodingKeys: String, CodingKey { private enum CodingKeys: String, CodingKey {
case trailing = "right"
case leading = "left" case leading = "left"
case trailing = "right"
} }
} }
@@ -8,10 +8,10 @@ import Foundation
/// `center` centers the window on both axes. /// `center` centers the window on both axes.
enum PHThemeWindowAnchor: String, Decodable { enum PHThemeWindowAnchor: String, Decodable {
case top, bottom, leading, trailing case top, bottom, leading, trailing
case topLeading = "top-leading" case topLeading = "top-left"
case topTrailing = "top-trailing" case topTrailing = "top-right"
case bottomLeading = "bottom-leading" case bottomLeading = "bottom-left"
case bottomTrailing = "bottom-trailing" case bottomTrailing = "bottom-right"
case center case center
} }
@@ -13,6 +13,13 @@ struct PHThemeWindowMargin: Decodable, Equatable {
let leading: Double? let leading: Double?
let trailing: Double? let trailing: Double?
private enum CodingKeys: String, CodingKey {
case top
case bottom
case leading = "left"
case trailing = "right"
}
init( init(
top: Double? = nil, top: Double? = nil,
bottom: Double? = nil, bottom: Double? = nil,