struct CodeStyle
Swift
struct CodeStyle
Style palette for EditorView. Rules carry style indices; this maps them
to colours, so a theme change restyles code without touching any rule.
Sources/LavaUI/EditorView.swift:5
Constructors
init(text: Color = .primary, gutterText: Color? = nil, gutterBackground: Color? = nil, currentLine: Color? = nil, searchMatch: Color? = nil, currentSearchMatch: Color? = nil, palette: [Color] = [])
Creates a palette. Colours left nil come from the current theme, apart
from the two search fills, which have fixed amber defaults.
Sources/LavaUI/EditorView.swift:23
Properties
var currentLine: Color
Fill behind the line the caret is on.
Sources/LavaUI/EditorView.swift:13
var currentSearchMatch: Color
Fill behind the search match the search is currently on.
Sources/LavaUI/EditorView.swift:17
var gutterBackground: Color
Fill behind the line-number gutter.
Sources/LavaUI/EditorView.swift:11
var gutterText: Color
Colour of the line numbers.
Sources/LavaUI/EditorView.swift:9
var palette: [Color]
Indexed by HighlightRule.styleIndex; out-of-range falls back to text.
Sources/LavaUI/EditorView.swift:19
var searchMatch: Color
Fill behind every search match.
Sources/LavaUI/EditorView.swift:15
var text: Color
Colour of text no rule matched.
Sources/LavaUI/EditorView.swift:7