summaryrefslogtreecommitdiff
path: root/src/ui
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2020-07-26 15:25:31 +0300
committerJaakko Keränen <jaakko.keranen@iki.fi>2020-07-26 15:25:31 +0300
commit0f0369dbb60876676b6e4ea1c6bac96e24033ae8 (patch)
treee016782a05420b0f720754b1c5196f9fa2a4a693 /src/ui
parent3d60806534f5fd20e321a1290f3942215dcf1121 (diff)
Added a new darkest gray to the palette
Diffstat (limited to 'src/ui')
-rw-r--r--src/ui/color.c1
-rw-r--r--src/ui/color.h32
-rw-r--r--src/ui/documentwidget.c2
3 files changed, 19 insertions, 16 deletions
diff --git a/src/ui/color.c b/src/ui/color.c
index 179006c1..330dab1d 100644
--- a/src/ui/color.c
+++ b/src/ui/color.c
@@ -7,6 +7,7 @@ static const iColor transparent_;
7iColor get_Color(int color) { 7iColor get_Color(int color) {
8 static const iColor palette[] = { 8 static const iColor palette[] = {
9 { 0, 0, 0, 255 }, 9 { 0, 0, 0, 255 },
10 { 24, 24, 24, 255 },
10 { 40, 40, 40, 255 }, 11 { 40, 40, 40, 255 },
11 { 80, 80, 80, 255 }, 12 { 80, 80, 80, 255 },
12 { 160, 160, 160, 255 }, 13 { 160, 160, 160, 255 },
diff --git a/src/ui/color.h b/src/ui/color.h
index 7587e213..d8b1f4d1 100644
--- a/src/ui/color.h
+++ b/src/ui/color.h
@@ -5,12 +5,13 @@
5enum iColorId { 5enum iColorId {
6 none_ColorId = -1, 6 none_ColorId = -1,
7 black_ColorId, 7 black_ColorId,
8 gray15_ColorId,
8 gray25_ColorId, 9 gray25_ColorId,
9 gray50_ColorId, 10 gray50_ColorId,
10 gray75_ColorId, 11 gray75_ColorId,
11 gray88_ColorId, 12 gray88_ColorId,
12 white_ColorId, 13 white_ColorId,
13 brown_ColorId, 14 brown_ColorId,
14 orange_ColorId, 15 orange_ColorId,
15 teal_ColorId, 16 teal_ColorId,
16 cyan_ColorId, 17 cyan_ColorId,
@@ -26,20 +27,21 @@ enum iColorId {
26#define permanent_ColorId 0x80 /* cannot be changed via escapes */ 27#define permanent_ColorId 0x80 /* cannot be changed via escapes */
27 28
28#define black_ColorEscape "\r0" 29#define black_ColorEscape "\r0"
29#define gray25_ColorEscape "\r1" 30#define gray15_ColorEscape "\r1"
30#define gray50_ColorEscape "\r2" 31#define gray25_ColorEscape "\r2"
31#define gray75_ColorEscape "\r3" 32#define gray50_ColorEscape "\r3"
32#define gray88_ColorEscape "\r4" 33#define gray75_ColorEscape "\r4"
33#define white_ColorEscape "\r5" 34#define gray88_ColorEscape "\r5"
34#define brown_ColorEscape "\r6" 35#define white_ColorEscape "\r6"
35#define orange_ColorEscape "\r7" 36#define brown_ColorEscape "\r7"
36#define teal_ColorEscape "\r8" 37#define orange_ColorEscape "\r8"
37#define cyan_ColorEscape "\r9" 38#define teal_ColorEscape "\r9"
38#define yellow_ColorEscape "\r:" 39#define cyan_ColorEscape "\r:"
39#define red_ColorEscape "\r;" 40#define yellow_ColorEscape "\r;"
40#define magenta_ColorEscape "\r<" 41#define red_ColorEscape "\r<"
41#define blue_ColorEscape "\r=" 42#define magenta_ColorEscape "\r="
42#define green_ColorEscape "\r>" 43#define blue_ColorEscape "\r>"
44#define green_ColorEscape "\r?"
43 45
44iDeclareType(Color) 46iDeclareType(Color)
45 47
diff --git a/src/ui/documentwidget.c b/src/ui/documentwidget.c
index 29f880ee..5df2b1b9 100644
--- a/src/ui/documentwidget.c
+++ b/src/ui/documentwidget.c
@@ -514,7 +514,7 @@ static void draw_DocumentWidget_(const iDocumentWidget *d) {
514 draw_Widget(w); 514 draw_Widget(w);
515 iDrawContext ctx = { .widget = d, .bounds = documentBounds_DocumentWidget_(d) }; 515 iDrawContext ctx = { .widget = d, .bounds = documentBounds_DocumentWidget_(d) };
516 init_Paint(&ctx.paint); 516 init_Paint(&ctx.paint);
517 fillRect_Paint(&ctx.paint, bounds, gray25_ColorId); 517 fillRect_Paint(&ctx.paint, bounds, gray15_ColorId);
518 setClip_Paint(&ctx.paint, bounds); 518 setClip_Paint(&ctx.paint, bounds);
519 render_GmDocument(d->doc, visibleRange_DocumentWidget_(d), drawRun_DrawContext_, &ctx); 519 render_GmDocument(d->doc, visibleRange_DocumentWidget_(d), drawRun_DrawContext_, &ctx);
520 clearClip_Paint(&ctx.paint); 520 clearClip_Paint(&ctx.paint);