rename leading and trailing externally in left and right
This commit is contained in:
@@ -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)
|
||||
)
|
||||
}()
|
||||
}
|
||||
|
||||
@@ -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"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user