~royniang/lib

ref: 7b41e484cd650986491405751846a4780878b74b lib/patches/samterm.XOK9.diff -rw-r--r-- 3.5 KiB
7b41e484roy niang Some improvement and safety measures. 8 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
diff -r 175f3e344edd sys/src/cmd/samterm/flayer.c
--- a/sys/src/cmd/samterm/flayer.c	Sat Feb 20 12:55:42 2021 +0100
+++ b/sys/src/cmd/samterm/flayer.c	Sat Feb 20 13:42:52 2021 +0100
@@ -29,18 +29,22 @@
 	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[HTEXT] = display->black;
+	maincols[BACK] = allocimage(display, Rect(0,0,1,1), screen->chan, 1, 0xE2E8E8FF);
+	maincols[HIGH] = allocimage(display, Rect(0,0,1,1), screen->chan, 1, 0xCD664DFF);
+ 	maincols[BORD] = allocimage(display, Rect(0,0,2,2), CMAP8, 1, 0x8795BFFF);
+ 	draw(maincols[BORD], Rect(1,1,2,2), allocimage(display, Rect(0,0,1,1), screen->chan, 1, 0xE2E8E8FF), nil, ZP);
+ 	draw(maincols[BORD], Rect(0,0,1,1), allocimage(display, Rect(0,0,1,1), screen->chan, 1, 0xE2E8E8FF), nil, ZP);
+	maincols[TEXT] = allocimage(display, Rect(0,0,1,1), screen->chan, 1, 0x4F5165FF);
+	maincols[HTEXT] = allocimage(display, Rect(0,0,1,1), screen->chan, 1, 0xE2E8E8FF);
 
 	/* 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[HTEXT] = display->black;
+	cmdcols[BACK] = allocimage(display, Rect(0,0,1,1), screen->chan, 1, 0x4F5165FF);
+	cmdcols[HIGH] = allocimage(display, Rect(0,0,1,1), screen->chan, 1, 0xE2E8E8FF);
+	cmdcols[BORD] = allocimage(display, Rect(0,0,2,2), CMAP8, 1, 0x8795BFFF);
+ 	draw(cmdcols[BORD], Rect(1,1,2,2), allocimage(display, Rect(0,0,1,1), screen->chan, 1, 0xE2E8E8FF), nil, ZP);
+ 	draw(cmdcols[BORD], Rect(0,0,1,1), allocimage(display, Rect(0,0,1,1), screen->chan, 1, 0xE2E8E8FF), nil, ZP);
+	cmdcols[TEXT] = allocimage(display, Rect(0,0,1,1), screen->chan, 1, 0xE2E8E8FF);
+	cmdcols[HTEXT] = allocimage(display, Rect(0,0,1,1), screen->chan, 1, 0xCD664DFF);
 }
 
 void
diff -r 175f3e344edd sys/src/cmd/samterm/menu.c
--- a/sys/src/cmd/samterm/menu.c	Sat Feb 20 12:55:42 2021 +0100
+++ b/sys/src/cmd/samterm/menu.c	Sat Feb 20 13:42:52 2021 +0100
@@ -45,21 +45,21 @@
 };
 
 char	*menu2str[] = {
-	"cut",
-	"paste",
-	"snarf",
-	"plumb",
-	"look",
+	"Cut",
+	"Paste",
+	"Snarf",
+	"Plumb",
+	"Look",
 	"<rio>",
 	0,		/* storage for last pattern */
 };
 
 char	*menu3str[] = {
-	"new",
-	"zerox",
-	"resize",
-	"close",
-	"write",
+	"New",
+	"Zerox",
+	"Resize",
+	"Close",
+	"Write",
 };
 
 Menu	menu2 =	{0, genmenu2};
diff -r 175f3e344edd sys/src/cmd/samterm/mkfile
--- a/sys/src/cmd/samterm/mkfile	Sat Feb 20 12:55:42 2021 +0100
+++ b/sys/src/cmd/samterm/mkfile	Sat Feb 20 13:42:52 2021 +0100
@@ -1,6 +1,6 @@
 </$objtype/mkfile
 
-TARG=samterm
+TARG=samterm.$sysname
 OFILES=main.$O\
 	icons.$O\
 	menu.$O\
diff -r 175f3e344edd sys/src/cmd/samterm/scroll.c
--- a/sys/src/cmd/samterm/scroll.c	Sat Feb 20 12:55:42 2021 +0100
+++ b/sys/src/cmd/samterm/scroll.c	Sat Feb 20 13:42:52 2021 +0100
@@ -93,8 +93,9 @@
 	if(!eqrect(r2, l->lastsr)){
 		l->lastsr = r2;
 		draw(b, r1, l->f.cols[BORD], nil, ZP);
-		draw(b, r2, l->f.cols[BACK], nil, r2.min);
+		draw(b, r2, allocimage(display, Rect(0,0,2,2), screen->chan, 1, 0x8795BFFF), nil, r2.min);
 		r2 = r1;
+		r2.max.x = r2.max.x+1;
 		r2.min.x = r2.max.x-1;
 		draw(b, r2, l->f.cols[BORD], nil, ZP);
 		if(b!=l->f.b)