summaryrefslogtreecommitdiff
path: root/src/ui/color.h
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2020-09-01 08:11:37 +0300
committerJaakko Keränen <jaakko.keranen@iki.fi>2020-09-01 08:11:37 +0300
commit6e797e23b7c3eb2c4df3418ec007f2196cd3ccd4 (patch)
treea2cfe9c25ecd171ebb639078ffefb3f04bf4fc9b /src/ui/color.h
parentacaa77a888a8d937839431a8295c904a12ed8bdc (diff)
Text: Fixed color escape ASCII overflow
Diffstat (limited to 'src/ui/color.h')
-rw-r--r--src/ui/color.h40
1 files changed, 21 insertions, 19 deletions
diff --git a/src/ui/color.h b/src/ui/color.h
index 46e7b56a..76e5b2a7 100644
--- a/src/ui/color.h
+++ b/src/ui/color.h
@@ -68,6 +68,7 @@ enum iColorId {
68 uiText_ColorId, 68 uiText_ColorId,
69 uiTextPressed_ColorId, 69 uiTextPressed_ColorId,
70 uiTextSelected_ColorId, 70 uiTextSelected_ColorId,
71 uiTextDisabled_ColorId,
71 uiTextFramelessHover_ColorId, 72 uiTextFramelessHover_ColorId,
72 uiTextFramelessSelected_ColorId, 73 uiTextFramelessSelected_ColorId,
73 uiTextStrong_ColorId, 74 uiTextStrong_ColorId,
@@ -101,7 +102,6 @@ enum iColorId {
101 uiSeparator_ColorId, 102 uiSeparator_ColorId,
102 uiMarked_ColorId, 103 uiMarked_ColorId,
103 uiMatching_ColorId, 104 uiMatching_ColorId,
104 uiTextDisabled_ColorId,
105 105
106 /* content theme colors */ 106 /* content theme colors */
107 tmFirst_ColorId, 107 tmFirst_ColorId,
@@ -163,24 +163,26 @@ iLocalDef iBool isRegularText_ColorId(enum iColorId d) {
163#define mask_ColorId 0x7f 163#define mask_ColorId 0x7f
164#define permanent_ColorId 0x80 /* cannot be changed via escapes */ 164#define permanent_ColorId 0x80 /* cannot be changed via escapes */
165 165
166#define black_ColorEscape "\r0" 166#define asciiBase_ColorEscape 33
167#define gray25_ColorEscape "\r1" 167
168#define gray50_ColorEscape "\r2" 168#define black_ColorEscape "\r!"
169#define gray75_ColorEscape "\r3" 169#define gray25_ColorEscape "\r\""
170#define white_ColorEscape "\r4" 170#define gray50_ColorEscape "\r#"
171#define brown_ColorEscape "\r5" 171#define gray75_ColorEscape "\r$"
172#define orange_ColorEscape "\r6" 172#define white_ColorEscape "\r%"
173#define teal_ColorEscape "\r7" 173#define brown_ColorEscape "\r&"
174#define cyan_ColorEscape "\r8" 174#define orange_ColorEscape "\r'"
175#define yellow_ColorEscape "\r9" 175#define teal_ColorEscape "\r("
176#define red_ColorEscape "\r:" 176#define cyan_ColorEscape "\r)"
177#define magenta_ColorEscape "\r;" 177#define yellow_ColorEscape "\r*"
178#define blue_ColorEscape "\r<" 178#define red_ColorEscape "\r+"
179#define green_ColorEscape "\r=" 179#define magenta_ColorEscape "\r,"
180#define uiText_ColorEscape "\rC" 180#define blue_ColorEscape "\r-"
181#define uiTextAction_ColorEscape "\rJ" 181#define green_ColorEscape "\r."
182#define uiTextCaution_ColorEscape "\rK" 182#define uiText_ColorEscape "\r4"
183#define uiHeading_ColorEscape "\r`" 183#define uiTextAction_ColorEscape "\r<"
184#define uiTextCaution_ColorEscape "\r="
185#define uiHeading_ColorEscape "\rR"
184 186
185iDeclareType(Color) 187iDeclareType(Color)
186iDeclareType(HSLColor) 188iDeclareType(HSLColor)