diff --git a/Sources/phbar/Models/PHTheme/PHThemeStyle.swift b/Sources/phbar/Models/PHTheme/PHThemeStyle.swift index 36272a8..9729f85 100644 --- a/Sources/phbar/Models/PHTheme/PHThemeStyle.swift +++ b/Sources/phbar/Models/PHTheme/PHThemeStyle.swift @@ -10,7 +10,7 @@ struct PHThemeStyle: Decodable { name: "_default", foreground: .init(color: "#000000", alpha: nil), background: .init(color: "#ffffff", alpha: nil), - padding: .init(leading: 12, trailing: 12), + padding: .init(top: 0, bottom: 0, leading: 12, trailing: 12), corner: nil ) }() diff --git a/Sources/phbar/Models/PHTheme/PHThemeStyle/PHThemeStylePadding.swift b/Sources/phbar/Models/PHTheme/PHThemeStyle/PHThemeStylePadding.swift index de71a56..f77b3b9 100644 --- a/Sources/phbar/Models/PHTheme/PHThemeStyle/PHThemeStylePadding.swift +++ b/Sources/phbar/Models/PHTheme/PHThemeStyle/PHThemeStylePadding.swift @@ -1,8 +1,12 @@ struct PHThemeStylePadding: Decodable { + let top: Double? + let bottom: Double? let leading: Double? let trailing: Double? private enum CodingKeys: String, CodingKey { + case top + case bottom case leading = "left" case trailing = "right" } diff --git a/Sources/phbar/Views/TextView.swift b/Sources/phbar/Views/TextView.swift index 617ffdd..03ccac8 100644 --- a/Sources/phbar/Views/TextView.swift +++ b/Sources/phbar/Views/TextView.swift @@ -33,6 +33,8 @@ struct TextView: View { } .padding(.trailing, block.style.padding?.trailing ?? 0) .padding(.leading, block.style.padding?.leading ?? 0) + .padding(.top, block.style.padding?.top ?? 0) + .padding(.bottom, block.style.padding?.bottom ?? 0) } .fixedSize(horizontal: true, vertical: false) .border(block.debug ? .red : .clear)