.../Source/App/SearchAndPreview/ClipItems/ItemTableRowTextView.swift
Line | Count | Source (jump to first uncovered line) |
1 | | // |
2 | | // ItemTableRowTextView.swift |
3 | | // CutBox |
4 | | // |
5 | | // Created by Jason Milkins on 17/5/18. |
6 | | // Copyright © 2018-2023 ocodo. All rights reserved. |
7 | | // |
8 | | |
9 | | import Cocoa |
10 | | |
11 | | class ItemTableRowTextView: NSView { |
12 | | |
13 | | @IBOutlet weak var title: CutBoxBaseTextField! |
14 | | |
15 | 77 | let prefs = CutBoxPreferencesService.shared |
16 | | |
17 | 77 | var internalColor: NSColor = .textColor { |
18 | 74 | didSet { |
19 | 74 | self.title.textColor = internalColor |
20 | 74 | } |
21 | | } |
22 | | |
23 | | var color: NSColor { |
24 | 0 | get { |
25 | 0 | return internalColor |
26 | 0 | } |
27 | | |
28 | 74 | set { |
29 | 74 | internalColor = newValue |
30 | 74 | } |
31 | | } |
32 | | |
33 | | var internalData: [String: Any]? { |
34 | 80 | didSet { |
35 | 80 | setup() |
36 | 80 | } |
37 | | } |
38 | | var data: [String: Any]? { |
39 | 80 | get { |
40 | 80 | return internalData |
41 | 80 | } |
42 | 80 | set { |
43 | 80 | internalData = newValue |
44 | 80 | } |
45 | | } |
46 | | |
47 | 0 | override func viewWillDraw() { |
48 | 0 | super.viewWillDraw() |
49 | 0 | title.font = self.prefs.searchViewClipTextFieldFont |
50 | 0 | } |
51 | | |
52 | 0 | func setup() { |
53 | 0 | title.font = self.prefs.searchViewClipTextFieldFont |
54 | 0 | } |
55 | | } |