Commit 1dfd0b5
authored
[chore] Refactor STTextViewController to reduce duplication (#185)
### Description
Fixed a few UI bugs by reducing overlap between loadView and reloadUI
and calling reloadUI from loadView. These include...
- There were some areas where the theme background was not getting
applied.
- The currently selected line was not getting a background in the ruler
view until changing a setting which called reloadUI.
Now loadView calls reloadUI which allows us to reduce code duplication
### Related Issues
- n/a
### Checklist
<!--- Add things that are not yet implemented above -->
- [x] I read and understood the [contributing
guide](https://github.com/CodeEditApp/CodeEdit/blob/main/CONTRIBUTING.md)
as well as the [code of
conduct](https://github.com/CodeEditApp/CodeEdit/blob/main/CODE_OF_CONDUCT.md)
- [x] The issues this PR addresses are related to each other
- [x] My changes generate no new warnings
- [x] My code builds and runs on my machine
- [x] My changes are all related to the related issue above
- [x] I documented my code
### Screenshots
n/a1 parent 521dd43 commit 1dfd0b5
File tree
2 files changed
+21
-42
lines changed- Sources/CodeEditTextView/Controller
2 files changed
+21
-42
lines changedLines changed: 6 additions & 28 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
13 | 12 | | |
14 | 13 | | |
15 | 14 | | |
16 | 15 | | |
17 | 16 | | |
18 | 17 | | |
19 | 18 | | |
20 | | - | |
21 | 19 | | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | 20 | | |
26 | 21 | | |
27 | | - | |
28 | | - | |
29 | 22 | | |
30 | 23 | | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | 24 | | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
| 25 | + | |
| 26 | + | |
42 | 27 | | |
43 | 28 | | |
44 | 29 | | |
45 | 30 | | |
46 | 31 | | |
47 | 32 | | |
48 | 33 | | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | 34 | | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
| 35 | + | |
| 36 | + | |
57 | 37 | | |
58 | | - | |
59 | | - | |
60 | 38 | | |
61 | 39 | | |
62 | 40 | | |
63 | | - | |
64 | 41 | | |
65 | 42 | | |
66 | | - | |
67 | 43 | | |
| 44 | + | |
68 | 45 | | |
69 | 46 | | |
70 | 47 | | |
| |||
80 | 57 | | |
81 | 58 | | |
82 | 59 | | |
| 60 | + | |
83 | 61 | | |
84 | 62 | | |
85 | 63 | | |
| |||
Lines changed: 15 additions & 14 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
187 | 187 | | |
188 | 188 | | |
189 | 189 | | |
190 | | - | |
191 | | - | |
192 | | - | |
193 | | - | |
194 | | - | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
195 | 194 | | |
196 | 195 | | |
197 | | - | |
| 196 | + | |
198 | 197 | | |
199 | | - | |
| 198 | + | |
200 | 199 | | |
201 | | - | |
| 200 | + | |
202 | 201 | | |
203 | | - | |
204 | | - | |
205 | | - | |
| 202 | + | |
206 | 203 | | |
207 | 204 | | |
208 | | - | |
| 205 | + | |
209 | 206 | | |
210 | | - | |
211 | | - | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
212 | 213 | | |
213 | 214 | | |
214 | 215 | | |
| |||
0 commit comments