shithub: patch

ref: d26b21913c1d6ff92961286fe0159a79096b3613
dir: /spewaplay-col/

View raw version
diff -Naur a/aplay.c b/aplay.c
--- a/aplay.c	Sun Feb 14 06:54:35 2016
+++ b/aplay.c	Sun Feb 14 06:54:42 2016
@@ -85,7 +85,7 @@
 	codecargs.pidchan = chancreate(sizeof(ulong), 0);
 	waitchan = threadwaitchan();
 	initdraw(nil, nil, argv0);
-	back = allocimagemix(display, DPalebluegreen, DWhite);
+	back = allocimage(display, Rect(0,0,1,1), screen->chan, 1, 0x441100ff);
 	threadcreate(mousethread, &codecargs, STACK);
 	kbdargs.exit = chancreate(sizeof(char*), 0);
 	kbdargs.codecargs = &codecargs;
@@ -262,7 +262,8 @@
 		r1.max.x = r1.min.x + ((vlong)Dx(r2) * curoff) / maxoff;
 	r2.min.x = r1.max.x;
 	draw(screen, r1, back, nil, ZP);
-	draw(screen, r2, display->white, nil, ZP);
+	draw(screen, r2, display->black, nil, ZP);
+	/*
 	if(pause)
 		strcpy(buf, "pause");
 	else
@@ -273,9 +274,10 @@
 	r2 = rectaddpt(r2, subpt(divpt(r1.max, 2), divpt(r2.max, 2)));
 	r2 = rectaddpt(r2, screen->r.min);
 	r1 = insetrect(r2, -4);
-	draw(screen, r1, display->white, nil, ZP);
-	border(screen, insetrect(r1, 1), 2, display->black, ZP);
-	string(screen, r2.min, display->black, ZP, display->defaultfont, buf);
+	draw(screen, r1, display->black, nil, ZP);
+	border(screen, insetrect(r1, 1), 2, display->white, ZP);
+	string(screen, r2.min, display->white, ZP, display->defaultfont, buf);
+	*/
 	flushimage(display, 1);
 }
 
diff -Naur a/volume.c b/volume.c
--- a/volume.c	Sun Feb 14 06:55:07 2016
+++ b/volume.c	Sun Feb 14 06:55:10 2016
@@ -4,8 +4,6 @@
 #include <event.h>
 #include <keyboard.h>
 
-char volstr[] = "volume";
-char mutestr[] = "muted";
 int volume, muted;
 Image *back;
 
@@ -21,16 +19,7 @@
 	r1.min.y = r1.max.y - ((vlong)Dy(r2) * volume) / 100;
 	r2.max.y = r1.min.y;
 	draw(screen, r1, back, nil, ZP);
-	draw(screen, r2, display->white, nil, ZP);
-	r2.min = ZP;
-	r2.max = stringsize(display->defaultfont, muted ? mutestr : volstr);
-	r1 = rectsubpt(screen->r, screen->r.min);
-	r2 = rectaddpt(r2, subpt(divpt(r1.max, 2), divpt(r2.max, 2)));
-	r2 = rectaddpt(r2, screen->r.min);
-	r1 = insetrect(r2, -4);
-	draw(screen, r1, display->white, nil, ZP);
-	border(screen, insetrect(r1, 1), 2, display->black, ZP);
-	string(screen, r2.min, display->black, ZP, display->defaultfont, muted ? mutestr : volstr);
+	draw(screen, r2, display->black, nil, ZP);
 	flushimage(display, 1);
 }
 
@@ -64,7 +53,7 @@
 	if(initdraw(0, 0, "volume") < 0)
 		sysfatal("initdraw failed: %r");
 	einit(Emouse|Ekeyboard);
-	back = allocimagemix(display, DPalebluegreen, DWhite);
+	back = allocimage(display, Rect(0,0,1,1), screen->chan, 1, 0x441100ff);
 	eresized(0);
 	for(;;) switch(event(&e)){
 	default: