From e0798b8a971f0b2d69c6cb0778d438d08a6aa171 Mon Sep 17 00:00:00 2001 From: Roopesh Chander Date: Tue, 22 Jan 2019 01:58:58 +0530 Subject: macOS: Make color theme use a dict Signed-off-by: Roopesh Chander --- WireGuard/WireGuard/UI/macOS/View/ConfTextStorage.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'WireGuard/WireGuard/UI/macOS/View/ConfTextStorage.swift') diff --git a/WireGuard/WireGuard/UI/macOS/View/ConfTextStorage.swift b/WireGuard/WireGuard/UI/macOS/View/ConfTextStorage.swift index 511a35c..423e7cd 100644 --- a/WireGuard/WireGuard/UI/macOS/View/ConfTextStorage.swift +++ b/WireGuard/WireGuard/UI/macOS/View/ConfTextStorage.swift @@ -103,7 +103,7 @@ class ConfTextStorage: NSTextStorage { let range = NSRange(location: span.start, length: span.len) backingStore.setAttributes(nonColorAttributes(for: span.type), range: range) if let textColorTheme = textColorTheme { - let color = textColorTheme.color(for: span.type) + let color = textColorTheme.colorMap[span.type.rawValue] ?? textColorTheme.defaultColor backingStore.addAttribute(.foregroundColor, value: color, range: range) } -- cgit v1.2.3-59-g8ed1b