diff options
Diffstat (limited to 'Sources/NorgUI/Theme/NorgTheme.swift')
| -rw-r--r-- | Sources/NorgUI/Theme/NorgTheme.swift | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/Sources/NorgUI/Theme/NorgTheme.swift b/Sources/NorgUI/Theme/NorgTheme.swift index 47dd161..c788812 100644 --- a/Sources/NorgUI/Theme/NorgTheme.swift +++ b/Sources/NorgUI/Theme/NorgTheme.swift @@ -32,6 +32,14 @@ public struct NorgTheme: Sendable { public var codeFont: Font /// Horizontal indentation applied per nesting level. public var indentWidth: CGFloat + /// Vertical spacing between the label and contents of a verbatim block. + public var verbatimLeadingSpace: CGFloat + /// Padding applied around the contents of a verbatim block. + public var verbatimPadding: CGFloat + /// Vertical spacing between sibling blocks and nodes. + public var blockSpacing: CGFloat + /// Padding applied above a heading. + public var headingTopPadding: CGFloat /// Tint for a task's status symbol. public var statusTint: @Sendable (TaskStatus) -> Color /// SF Symbol name for a task's status symbol. @@ -56,6 +64,10 @@ public struct NorgTheme: Sendable { codeBackground: AnyShapeStyle, codeFont: Font, indentWidth: CGFloat, + verbatimLeadingSpace: CGFloat = 4, + verbatimPadding: CGFloat = 10, + blockSpacing: CGFloat = 10, + headingTopPadding: CGFloat = 4, statusTint: @escaping @Sendable (TaskStatus) -> Color, statusSymbol: @escaping @Sendable (TaskStatus) -> String, statusLabel: @escaping @Sendable (TaskStatus) -> LocalizedStringResource = { $0.displayName } @@ -74,6 +86,10 @@ public struct NorgTheme: Sendable { self.codeBackground = codeBackground self.codeFont = codeFont self.indentWidth = indentWidth + self.verbatimLeadingSpace = verbatimLeadingSpace + self.verbatimPadding = verbatimPadding + self.blockSpacing = blockSpacing + self.headingTopPadding = headingTopPadding self.statusTint = statusTint self.statusSymbol = statusSymbol self.statusLabel = statusLabel |