nix/patches/acme.patch (view raw)
1diff --git a/src/cmd/acme/scrl.c b/src/cmd/acme/scrl.c
2index 6504699d..3aaeebef 100644
3--- a/src/cmd/acme/scrl.c
4+++ b/src/cmd/acme/scrl.c
5@@ -71,11 +71,11 @@ textscrdraw(Text *t)
6 if(!eqrect(r2, t->lastsr)){
7 t->lastsr = r2;
8 draw(b, r1, t->fr.cols[BORD], nil, ZP);
9- draw(b, r2, t->fr.cols[BACK], nil, ZP);
10+ r2.max.x = r2.max.x+1;
11+ draw(b, r2, t->fr.cols[TEXT], nil, ZP);
12 r2.min.x = r2.max.x-1;
13 draw(b, r2, t->fr.cols[BORD], nil, ZP);
14 draw(t->fr.b, r, b, nil, Pt(0, r1.min.y));
15-/*flushimage(display, 1); // BUG? */
16 }
17 }
18
19diff --git a/src/cmd/acme/acme.c b/src/cmd/acme/acme.c
20index 0e6bc0fd..c0a9e8ee 100644
21--- a/src/cmd/acme/acme.c
22+++ b/src/cmd/acme/acme.c
23@@ -1039,22 +1039,22 @@ iconinit(void)
24 Image *tmp;
25
26 if(tagcols[BACK] == nil) {
27- /* Blue */
28- tagcols[BACK] = allocimagemix(display, DPalebluegreen, DWhite);
29- tagcols[HIGH] = allocimage(display, Rect(0,0,1,1), screen->chan, 1, DPalegreygreen);
30- tagcols[BORD] = allocimage(display, Rect(0,0,1,1), screen->chan, 1, DPurpleblue);
31+ /* Tags */
32+ tagcols[BACK] = allocimage(display, Rect(0,0,1,1), screen->chan, 1, 0xCCCCCCFF);
33+ tagcols[HIGH] = allocimage(display, Rect(0,0,1,1), screen->chan, 1, 0x509C93FF);
34+ tagcols[BORD] = display->black;
35 tagcols[TEXT] = display->black;
36- tagcols[HTEXT] = display->black;
37+ tagcols[HTEXT] = allocimage(display, Rect(0,0,1,1), screen->chan, 1, 0xF4F4F4FF);
38
39- /* Yellow */
40- textcols[BACK] = allocimagemix(display, DPaleyellow, DWhite);
41- textcols[HIGH] = allocimage(display, Rect(0,0,1,1), screen->chan, 1, DDarkyellow);
42- textcols[BORD] = allocimage(display, Rect(0,0,1,1), screen->chan, 1, DYellowgreen);
43+ /* Body */
44+ textcols[BACK] = allocimage(display, Rect(0,0,1,1), screen->chan, 1, 0xF4F4F4FF);
45+ textcols[HIGH] = allocimage(display, Rect(0,0,1,1), screen->chan, 1, 0xCCCCCCFF);
46+ textcols[BORD] = allocimage(display, Rect(0,0,1,1), screen->chan, 1, 0x676767FF);
47 textcols[TEXT] = display->black;
48 textcols[HTEXT] = display->black;
49 }
50
51- r = Rect(0, 0, Scrollwid, font->height+1);
52+ r = Rect(0, 0, Scrollwid+ButtonBorder, font->height+1);
53 if(button && eqrect(r, button->r))
54 return;
55
56@@ -1066,24 +1066,27 @@ iconinit(void)
57
58 button = allocimage(display, r, screen->chan, 0, DNofill);
59 draw(button, r, tagcols[BACK], nil, r.min);
60- border(button, r, ButtonBorder, tagcols[BORD], ZP);
61+ r.max.x -= ButtonBorder;
62+ border(button, r, ButtonBorder, allocimage(display, Rect(0,0,1,1), screen->chan, 1, 0x676767FF), ZP);
63
64 r = button->r;
65- modbutton = allocimage(display, r, screen->chan, 0, DNofill);
66+ modbutton = allocimage(display, r, screen ->chan, 0, DNofill);
67 draw(modbutton, r, tagcols[BACK], nil, r.min);
68+ r.max.x -= ButtonBorder;
69 border(modbutton, r, ButtonBorder, tagcols[BORD], ZP);
70 r = insetrect(r, ButtonBorder);
71- tmp = allocimage(display, Rect(0,0,1,1), screen->chan, 1, DMedblue);
72+ tmp = allocimage(display, Rect(0,0,1,1), screen->chan, 1, 0x676767FF);
73 draw(modbutton, r, tmp, nil, ZP);
74 freeimage(tmp);
75
76 r = button->r;
77- colbutton = allocimage(display, r, screen->chan, 0, DPurpleblue);
78+ colbutton = allocimage(display, r, screen->chan, 0, 0x509C93FF);
79
80- but2col = allocimage(display, r, screen->chan, 1, 0xAA0000FF);
81- but3col = allocimage(display, r, screen->chan, 1, 0x006600FF);
82+ but2col = allocimage(display, r, screen->chan, 1, 0xB870CEFF);
83+ but3col = allocimage(display, r, screen->chan, 1, 0x7C9F4BFF);
84 }
85
86+
87 /*
88 * /dev/snarf updates when the file is closed, so we must open our own
89 * fd here rather than use snarffd