ref: 2d25e3bd940078aa04d18d098176ba73e91b4ae8
dir: /acme-col/
diff -r 49bd5e4c9bde sys/src/cmd/acme/acme.c --- a/sys/src/cmd/acme/acme.c Wed Feb 07 18:53:08 2018 +0000 +++ b/sys/src/cmd/acme/acme.c Sun Feb 18 20:30:34 2018 +0100 @@ -863,18 +863,18 @@ Image *tmp; /* Blue */ - tagcols[BACK] = allocimagemix(display, DPalebluegreen, DWhite); - tagcols[HIGH] = allocimage(display, Rect(0,0,1,1), screen->chan, 1, DPalegreygreen); - tagcols[BORD] = allocimage(display, Rect(0,0,1,1), screen->chan, 1, DPurpleblue); - tagcols[TEXT] = display->black; - tagcols[HTEXT] = display->black; + tagcols[BACK] = display->black; + tagcols[HIGH] = allocimage(display, Rect(0,0,1,1), screen->chan, 1, 0x111111FF); + tagcols[BORD] = allocimage(display, Rect(0,0,1,1), screen->chan, 1, 0x440000FF); + tagcols[TEXT] = allocimage(display, Rect(0,0,1,1), screen->chan, 1, 0x770000FF); + tagcols[HTEXT] = tagcols[TEXT]; /* Yellow */ - textcols[BACK] = allocimagemix(display, DPaleyellow, DWhite); - textcols[HIGH] = allocimage(display, Rect(0,0,1,1), screen->chan, 1, DDarkyellow); - textcols[BORD] = allocimage(display, Rect(0,0,1,1), screen->chan, 1, DYellowgreen); - textcols[TEXT] = display->black; - textcols[HTEXT] = display->black; + textcols[BACK] = display->black; + textcols[HIGH] = allocimage(display, Rect(0,0,1,1), screen->chan, 1, 0x440000FF); + textcols[BORD] = allocimage(display, Rect(0,0,1,1), screen->chan, 1, 0x111111FF); + textcols[TEXT] = allocimage(display, Rect(0,0,1,1), screen->chan, 1, 0x884400FF); + textcols[HTEXT] = textcols[TEXT]; if(button){ freeimage(button); @@ -894,12 +894,12 @@ r.max.x -= 2; border(modbutton, r, 2, tagcols[BORD], ZP); r = insetrect(r, 2); - tmp = allocimage(display, Rect(0,0,1,1), screen->chan, 1, DMedblue); + tmp = allocimage(display, Rect(0,0,1,1), screen->chan, 1, 0x884400FF); draw(modbutton, r, tmp, nil, ZP); freeimage(tmp); r = button->r; - colbutton = allocimage(display, r, screen->chan, 0, DPurpleblue); + colbutton = allocimage(display, r, screen->chan, 0, 0x440000FF); but2col = allocimage(display, r, screen->chan, 1, 0xAA0000FF); but3col = allocimage(display, r, screen->chan, 1, 0x006600FF); diff -r 49bd5e4c9bde sys/src/cmd/acme/cols.c --- a/sys/src/cmd/acme/cols.c Wed Feb 07 18:53:08 2018 +0000 +++ b/sys/src/cmd/acme/cols.c Sun Feb 18 20:30:34 2018 +0100 @@ -17,7 +17,7 @@ Rectangle r1; Text *t; - draw(screen, r, display->white, nil, ZP); + draw(screen, r, display->black, nil, ZP); c->r = r; c->w = nil; c->nw = 0; @@ -30,7 +30,7 @@ t->what = Columntag; r1.min.y = r1.max.y; r1.max.y += Border; - draw(screen, r1, display->black, nil, ZP); + draw(screen, r1, tagcols[BORD], nil, ZP); textinsert(t, 0, L"New Cut Paste Snarf Sort Zerox Delcol ", 38, TRUE); textsetselect(t, t->file->nc, t->file->nc); draw(screen, t->scrollr, colbutton, nil, colbutton->r.min); @@ -79,7 +79,7 @@ r1.max.y = min(y, v->body.r.min.y+v->body.nlines*v->body.font->height); r1.min.y = winresize(v, r1, FALSE); r1.max.y = r1.min.y+Border; - draw(screen, r1, display->black, nil, ZP); + draw(screen, r1, tagcols[BORD], nil, ZP); r.min.y = r1.max.y; } if(w == nil){ @@ -134,7 +134,7 @@ c->nw--; c->w = realloc(c->w, c->nw*sizeof(Window*)); if(c->nw == 0){ - draw(screen, r, display->white, nil, ZP); + draw(screen, r, display->black, nil, ZP); return; } if(i == c->nw){ /* extend last window down */ @@ -189,7 +189,7 @@ draw(screen, c->tag.scrollr, colbutton, nil, colbutton->r.min); r1.min.y = r1.max.y; r1.max.y += Border; - draw(screen, r1, display->black, nil, ZP); + draw(screen, r1, tagcols[BORD], nil, ZP); r1.max.y = r.max.y; for(i=0; i<c->nw; i++){ w = c->w[i]; @@ -200,7 +200,7 @@ r1.max.y = r1.min.y+(Dy(w->r)+Border)*Dy(r)/Dy(c->r); r2 = r1; r2.max.y = r2.min.y+Border; - draw(screen, r2, display->black, nil, ZP); + draw(screen, r2, tagcols[BORD], nil, ZP); r1.min.y = r2.max.y; r1.min.y = winresize(w, r1, FALSE); } @@ -256,7 +256,7 @@ r.max.y = r.min.y+Dy(w->r)+Border; r1 = r; r1.max.y = r1.min.y+Border; - draw(screen, r1, display->black, nil, ZP); + draw(screen, r1, tagcols[BORD], nil, ZP); r.min.y = r1.max.y; y = winresize(w, r, FALSE); } @@ -358,7 +358,7 @@ } r.min.y = v->r.max.y; r.max.y += Border; - draw(screen, r, display->black, nil, ZP); + draw(screen, r, tagcols[BORD], nil, ZP); y1 = r.max.y; } /* scan to see new size of everyone below */ @@ -390,7 +390,7 @@ if(i < c->nw-1){ r.min.y = r.max.y; r.max.y += Border; - draw(screen, r, display->black, nil, ZP); + draw(screen, r, tagcols[BORD], nil, ZP); for(j=i+1; j<c->nw; j++) ny[j] -= (y2-r.max.y); } @@ -410,7 +410,7 @@ if(j < c->nw-1){ /* no border on last window */ r.min.y = v->r.max.y; r.max.y += Border; - draw(screen, r, display->black, nil, ZP); + draw(screen, r, tagcols[BORD], nil, ZP); } y1 = r.max.y; } @@ -498,7 +498,7 @@ } r.min.y = v->r.max.y; r.max.y = r.min.y+Border; - draw(screen, r, display->black, nil, ZP); + draw(screen, r, tagcols[BORD], nil, ZP); r.min.y = r.max.y; if(i == c->nw-1) r.max.y = c->r.max.y; diff -r 49bd5e4c9bde sys/src/cmd/acme/rows.c --- a/sys/src/cmd/acme/rows.c Wed Feb 07 18:53:08 2018 +0000 +++ b/sys/src/cmd/acme/rows.c Sun Feb 18 20:30:34 2018 +0100 @@ -18,7 +18,7 @@ Rectangle r1; Text *t; - draw(screen, r, display->white, nil, ZP); + draw(screen, r, display->black, nil, ZP); row->r = r; row->col = nil; row->ncol = 0; @@ -32,7 +32,7 @@ t->col = nil; r1.min.y = r1.max.y; r1.max.y += Border; - draw(screen, r1, display->black, nil, ZP); + draw(screen, r1, tagcols[BORD], nil, ZP); textinsert(t, 0, L"Newcol Kill Putall Dump Exit ", 29, TRUE); textsetselect(t, t->file->nc, t->file->nc); } @@ -63,7 +63,7 @@ r = d->r; if(Dx(r) < 100) return nil; - draw(screen, r, display->white, nil, ZP); + draw(screen, r, display->black, nil, ZP); r1 = r; r1.max.x = min(x, r.max.x-50); if(Dx(r1) < 50) @@ -71,7 +71,7 @@ colresize(d, r1); r1.min.x = r1.max.x; r1.max.x = r1.min.x+Border; - draw(screen, r1, display->black, nil, ZP); + draw(screen, r1, tagcols[BORD], nil, ZP); r.min.x = r1.max.x; } if(c == nil){ @@ -105,7 +105,7 @@ textresize(&row->tag, r1); r1.min.y = r1.max.y; r1.max.y += Border; - draw(screen, r1, display->black, nil, ZP); + draw(screen, r1, tagcols[BORD], nil, ZP); r.min.y = r1.max.y; r1 = r; r1.max.x = r1.min.x; @@ -119,7 +119,7 @@ if(i > 0){ r2 = r1; r2.max.x = r2.min.x+Border; - draw(screen, r2, display->black, nil, ZP); + draw(screen, r2, tagcols[BORD], nil, ZP); r1.min.x = r2.max.x; } colresize(c, r1); @@ -178,14 +178,14 @@ p.x = c->r.max.x-80-Scrollwid; r = d->r; r.max.x = c->r.max.x; - draw(screen, r, display->white, nil, ZP); + draw(screen, r, display->black, nil, ZP); r.max.x = p.x; colresize(d, r); r = c->r; r.min.x = p.x; r.max.x = r.min.x; r.max.x += Border; - draw(screen, r, display->black, nil, ZP); + draw(screen, r, tagcols[BORD], nil, ZP); r.min.x = r.max.x; r.max.x = c->r.max.x; colresize(c, r); @@ -210,7 +210,7 @@ row->ncol--; row->col = realloc(row->col, row->ncol*sizeof(Column*)); if(row->ncol == 0){ - draw(screen, r, display->white, nil, ZP); + draw(screen, r, display->black, nil, ZP); return; } if(i == row->ncol){ /* extend last column right */ @@ -221,7 +221,7 @@ c = row->col[i]; r.max.x = c->r.max.x; } - draw(screen, r, display->white, nil, ZP); + draw(screen, r, display->black, nil, ZP); colresize(c, r); } @@ -543,12 +543,12 @@ r2.min.x = x+Border; if(Dx(r1) < 50 || Dx(r2) < 50) continue; - draw(screen, Rpt(r1.min, r2.max), display->white, nil, ZP); + draw(screen, Rpt(r1.min, r2.max), display->black, nil, ZP); colresize(c1, r1); colresize(c2, r2); r2.min.x = x; r2.max.x = x+Border; - draw(screen, r2, display->black, nil, ZP); + draw(screen, r2, tagcols[BORD], nil, ZP); } if(i >= row->ncol) rowadd(row, nil, x); diff -r 49bd5e4c9bde sys/src/cmd/acme/text.c --- a/sys/src/cmd/acme/text.c Wed Feb 07 18:53:08 2018 +0000 +++ b/sys/src/cmd/acme/text.c Sun Feb 18 20:30:34 2018 +0100 @@ -1141,12 +1141,12 @@ pt1 = pt0; reg = region(q, p0); if(reg == 0) - frdrawsel0(f, pt0, p0, p1, col, display->white); + frdrawsel0(f, pt0, p0, p1, col, display->black); } qt = frptofchar(f, q); if(reg > 0){ if(q > p1) - frdrawsel0(f, pt1, p1, q, col, display->white); + frdrawsel0(f, pt1, p1, q, col, display->black); else if(q < p1) selrestore(f, qt, q, p1); @@ -1154,7 +1154,7 @@ if(q > p1) selrestore(f, pt1, p1, q); else - frdrawsel0(f, qt, q, p1, col, display->white); + frdrawsel0(f, qt, q, p1, col, display->black); } p1 = q; pt1 = qt;