ref: 6094625c3b1e6964bec9314ef07b1eea2dcf47cd
parent: a757798f9113eeb71a57f24fa0edc9600eb62a8c
author: qwx <qwx@sciops.net>
date: Sat Dec 18 15:24:41 EST 2021
some pastel col patches
--- /dev/null
+++ b/libdraw-pastelmenucol
@@ -1,0 +1,68 @@
+--- a//sys/src/libdraw/emenuhit.c
++++ b//sys/src/libdraw/emenuhit.c
+@@ -27,13 +27,14 @@
+ menucolors(void)
+ {
+ /* Main tone is greenish, with negative selection */
+- back = allocimagemix(display, DPalegreen, DWhite);
+- high = allocimage(display, Rect(0,0,1,1), CMAP8, 1, DDarkgreen); /* dark green */
+- bord = allocimage(display, Rect(0,0,1,1), CMAP8, 1, DMedgreen); /* not as dark green */
+- if(back==nil || high==nil || bord==nil)
++ text = display->white;
++ high = allocimage(display, Rect(0,0,1,1), CMAP8, 1, 0x9C9C9CFF);
++ bord = allocimage(display, Rect(0,0,1,1), CMAP8, 1, 0xDEDEDEFF);
++ if(text==nil || high==nil || bord==nil)
+ goto Error;
+- text = display->black;
++ back = display->black;
+ htext = back;
++ menutxt = high;
+ return;
+
+ Error:
+@@ -149,10 +150,7 @@
+ if(r.max.y < r.min.y+2)
+ r.max.y = r.min.y+2;
+ border(screen, r, 1, bord, ZP);
+- if(menutxt == 0)
+- menutxt = allocimage(display, Rect(0, 0, 1, 1), CMAP8, 1, DDarkgreen);
+- if(menutxt)
+- draw(screen, insetrect(r, 1), menutxt, nil, ZP);
++ draw(screen, insetrect(r, 1), menutxt, nil, ZP);
+ }
+
+ int
+--- a//sys/src/libdraw/menuhit.c
++++ b//sys/src/libdraw/menuhit.c
+@@ -28,13 +28,14 @@
+ menucolors(void)
+ {
+ /* Main tone is greenish, with negative selection */
+- back = allocimagemix(display, DPalegreen, DWhite);
+- high = allocimage(display, Rect(0,0,1,1), screen->chan, 1, DDarkgreen); /* dark green */
+- bord = allocimage(display, Rect(0,0,1,1), screen->chan, 1, DMedgreen); /* not as dark green */
+- if(back==nil || high==nil || bord==nil)
++ text = display->white;
++ high = allocimage(display, Rect(0,0,1,1), CMAP8, 1, 0x9C9C9CFF);
++ bord = allocimage(display, Rect(0,0,1,1), CMAP8, 1, 0xDEDEDEFF);
++ if(text==nil || high==nil || bord==nil)
+ goto Error;
+- text = display->black;
++ back = display->black;
+ htext = back;
++ menutxt = high;
+ return;
+
+ Error:
+@@ -146,10 +147,7 @@
+ if(r.max.y < r.min.y+2)
+ r.max.y = r.min.y+2;
+ border(m, r, 1, bord, ZP);
+- if(menutxt == 0)
+- menutxt = allocimage(display, Rect(0, 0, 1, 1), screen->chan, 1, DDarkgreen); /* border color; BUG? */
+- if(menutxt)
+- draw(m, insetrect(r, 1), menutxt, nil, ZP);
++ draw(m, insetrect(r, 1), menutxt, nil, ZP);
+ }
+
+ int
--- /dev/null
+++ b/samterm-pastelcol
@@ -1,0 +1,63 @@
+--- a//sys/src/cmd/samterm/flayer.c
++++ b//sys/src/cmd/samterm/flayer.c
+@@ -29,17 +29,17 @@
+ lDrect = r;
+
+ /* Main text is yellowish */
+- maincols[BACK] = allocimagemix(display, DPaleyellow, DWhite);
+- maincols[HIGH] = allocimage(display, Rect(0,0,1,1), screen->chan, 1, DDarkyellow);
+- maincols[BORD] = allocimage(display, Rect(0,0,2,2), screen->chan, 1, DYellowgreen);
+- maincols[TEXT] = display->black;
++ maincols[BACK] = display->black;
++ maincols[HIGH] = allocimage(display, Rect(0,0,1,1), screen->chan, 1, 0x8F8F8FFF);
++ maincols[BORD] = allocimage(display, Rect(0,0,2,2), screen->chan, 1, 0x363636FF);
++ maincols[TEXT] = display->white;
+ maincols[HTEXT] = display->black;
+
+ /* Command text is blueish */
+- cmdcols[BACK] = allocimagemix(display, DPalebluegreen, DWhite);
+- cmdcols[HIGH] = allocimage(display, Rect(0,0,1,1), screen->chan, 1, DPalegreygreen);
+- cmdcols[BORD] = allocimage(display, Rect(0,0,2,2), screen->chan, 1, DPurpleblue);
+- cmdcols[TEXT] = display->black;
++ cmdcols[BACK] = display->black;
++ cmdcols[HIGH] = allocimage(display, Rect(0,0,1,1), screen->chan, 1, 0x9C9C9CFF);
++ cmdcols[BORD] = allocimage(display, Rect(0,0,2,2), screen->chan, 1, 0xDCBC72FF);
++ cmdcols[TEXT] = allocimage(display, Rect(0,0,1,1), screen->chan, 1, 0xFFAD00FF);
+ cmdcols[HTEXT] = display->black;
+ }
+
+@@ -89,12 +89,12 @@
+ flclose(Flayer *l)
+ {
+ if(l->visible == All)
+- draw(screen, l->entire, display->white, nil, ZP);
++ draw(screen, l->entire, display->black, nil, ZP);
+ else if(l->visible == Some){
+ if(l->f.b == 0)
+ l->f.b = allocimage(display, l->entire, screen->chan, 0, DNofill);
+ if(l->f.b){
+- draw(l->f.b, l->entire, display->white, nil, ZP);
++ draw(l->f.b, l->entire, display->black, nil, ZP);
+ flrefresh(l, l->entire, 0);
+ }
+ }
+@@ -362,7 +362,7 @@
+ if(0 && Dx(dr)==Dx(olDrect) && Dy(dr)==Dy(olDrect))
+ move = 1;
+ else
+- draw(screen, lDrect, display->white, nil, ZP);
++ draw(screen, lDrect, display->black, nil, ZP);
+ for(i=0; i<nllist; i++){
+ l = llist[i];
+ l->lastsr = ZR;
+--- a//sys/src/cmd/samterm/plan9.c
++++ b//sys/src/cmd/samterm/plan9.c
+@@ -46,7 +46,7 @@
+ if(t != nil)
+ maxtab = strtoul(t, nil, 0);
+ free(t);
+- draw(screen, screen->clipr, display->white, nil, ZP);
++ draw(screen, screen->clipr, display->black, nil, ZP);
+ }
+
+ int