shithub: patch

Download patch

ref: 5f8676311b7d01ba0027afcb1194323b6023a6fe
parent: ef347c230867fbe853a7419c39a9f3bda4702008
author: qwx <qwx@sciops.net>
date: Thu Mar 17 23:28:46 EDT 2022

nuke more color patches

--- a/stats-col
+++ /dev/null
@@ -1,89 +1,0 @@
-diff -r 034743cc4f9f sys/src/cmd/stats.c
---- a/sys/src/cmd/stats.c	Thu Jun 14 21:54:42 2018 +0200
-+++ b/sys/src/cmd/stats.c	Sun Jun 17 07:30:50 2018 +0200
-@@ -208,6 +208,7 @@
- };
- 
- Image	*cols[Ncolor][3];
-+Image	*txt;
- Graph	*graph;
- Machine	*mach;
- char	*mysysname;
-@@ -271,30 +272,23 @@
- }
- 
- void
--mkcol(int i, int c0, int c1, int c2)
-+mkcol(int i, int c0, int c1)
- {
--	cols[i][0] = allocimagemix(display, c0, DWhite);
--	cols[i][1] = allocimage(display, Rect(0,0,1,1), CMAP8, 1, c1);
--	cols[i][2] = allocimage(display, Rect(0,0,1,1), CMAP8, 1, c2);
-+	cols[i][0] = allocimagemix(display, c0, DBlack);
-+	cols[i][1] = allocimagemix(display, 0x773300FF, c1);
-+	cols[i][2] = allocimage(display, Rect(0,0,1,1), RGB24, 1, c1);
- }
- 
- void
- colinit(void)
- {
--	/* Peach */
--	mkcol(0, 0xFFAAAAFF, 0xFFAAAAFF, 0xBB5D5DFF);
--	/* Aqua */
--	mkcol(1, DPalebluegreen, DPalegreygreen, DPurpleblue);
--	/* Yellow */
--	mkcol(2, DPaleyellow, DDarkyellow, DYellowgreen);
--	/* Green */
--	mkcol(3, DPalegreen, DMedgreen, DDarkgreen);
--	/* Blue */
--	mkcol(4, 0x00AAFFFF, 0x00AAFFFF, 0x0088CCFF);
--	/* Grey */
--	cols[5][0] = allocimage(display, Rect(0,0,1,1), CMAP8, 1, 0xEEEEEEFF);
--	cols[5][1] = allocimage(display, Rect(0,0,1,1), CMAP8, 1, 0xCCCCCCFF);
--	cols[5][2] = allocimage(display, Rect(0,0,1,1), CMAP8, 1, 0x888888FF);
-+	mkcol(0, 0x994400FF, 0x442200FF);
-+	mkcol(1, 0x993C00FF, 0x441F00FF);
-+	mkcol(2, 0x993300FF, 0x441C00FF);
-+	mkcol(3, 0x992200FF, 0x441800FF);
-+	mkcol(4, 0x991100FF, 0x441400FF);
-+	mkcol(5, 0x990000FF, 0x441100FF);
-+	txt = allocimage(display, Rect(0,0,1,1), RGB24, 1, 0x441100FF);
- }
- 
- int
-@@ -437,7 +431,7 @@
- 		g->overflow = 1;
- 		draw(g->overtmp, g->overtmp->r, screen, nil, g->overtmp->r.min);
- 		sprint(buf, "%llud", v);
--		string(screen, g->overtmp->r.min, display->black, ZP, font, buf);
-+		string(screen, g->overtmp->r.min, txt, ZP, font, buf);
- 	}
- }
- 
-@@ -1094,7 +1088,7 @@
- 	uvlong v, vmax;
- 	char buf[128], labs[Nlab][Lablen];
- 
--	draw(screen, screen->r, display->white, nil, ZP);
-+	draw(screen, screen->r, display->black, nil, ZP);
- 
- 	/* label left edge */
- 	x = screen->r.min.x;
-@@ -1123,7 +1117,7 @@
- 			snprint(buf, sizeof buf, "%.*s(%d)", j, mach[i].shortname, n);
- 		}else
- 			snprint(buf, sizeof buf, "%.*s", j, mach[i].shortname);
--		string(screen, Pt(x+Labspace, screen->r.min.y + Labspace), display->black, ZP, font, buf);
-+		string(screen, Pt(x+Labspace, screen->r.min.y + Labspace), txt, ZP, font, buf);
- 	}
- 
- 	maxx = screen->r.max.x;
-@@ -1148,7 +1142,7 @@
- 					ly = y + (dy*(nlab-k)/(nlab+1));
- 					draw(screen, Rect(maxx+1, ly, maxx+1+Lx, ly+1), display->black, nil, ZP);
- 					ly -= font->height/2;
--					string(screen, Pt(maxx+1+Lx, ly), display->black, ZP, font, labs[k]);
-+					string(screen, Pt(maxx+1+Lx, ly), txt, ZP, font, labs[k]);
- 				}
- 			}
- 		}
--- a/statusbar-col
+++ /dev/null
@@ -1,16 +1,0 @@
-diff -r c055db14ff2b sys/src/cmd/aux/statusbar.c
---- a/sys/src/cmd/aux/statusbar.c	Sun Dec 06 14:50:50 2020 +0100
-+++ b/sys/src/cmd/aux/statusbar.c	Sun Dec 06 15:02:12 2020 +0100
-@@ -18,9 +18,9 @@
- void
- initcolor(void)
- {
--	text = display->black;
--	light = allocimagemix(display, DPalegreen, DWhite);
--	dark = allocimage(display, Rect(0,0,1,1), CMAP8, 1, DDarkgreen);
-+	text = allocimage(display, Rect(0,0,1,1), CMAP8, 1, 0x440000FF);
-+	light = display->black;
-+	dark = text;
- 	if(light == nil || dark == nil) sysfatal("initcolor: %r");
- }
- 
--- a/statusmsg-col
+++ /dev/null
@@ -1,14 +1,0 @@
-diff -r c055db14ff2b sys/src/cmd/aux/statusmsg.c
---- a/sys/src/cmd/aux/statusmsg.c	Sun Dec 06 14:50:50 2020 +0100
-+++ b/sys/src/cmd/aux/statusmsg.c	Sun Dec 06 15:02:20 2020 +0100
-@@ -20,8 +20,8 @@
- void
- initcolor(void)
- {
--	text = display->black;
--	light = allocimagemix(display, DPalegreen, DWhite);
-+	text = allocimage(display, Rect(0,0,1,1), CMAP8, 1, 0x440000FF);
-+	light = display->black;
- 	if(light == nil) sysfatal("initcolor: %r");
- }
-