commit 3f1e29a
ohmu
·
2026-09-22 10:09:27 +0300 MSK
parent 6fc42cb
fixes for coolwinbtn and coolcolbtn 3(alef theme)
+1,
-1
1@@ -1,6 +1,6 @@
2 # acme3k
3
4-
5+
6
7 A modern, usable fork of [acme2k](https://github.com/karahobny/acme2k), itself a fork of
8 [plan9port](https://github.com/9fans/plan9port)'s acme.
M
acme.c
+18,
-11
1@@ -974,15 +974,15 @@ tilebit(int dark)
2 t = allocimage(display, Rect(0,0,4,2), screen->chan, 1, dark ? DBlack : DWhite);
3 if(t == nil)
4 return nil;
5- draw(t, Rect(2,0,3,1), fg, nil, ZP);
6- draw(t, Rect(0,1,1,2), fg, nil, ZP);
7+ draw(t, Rect(0,0,1,1), fg, nil, ZP);
8+ draw(t, Rect(2,1,3,2), fg, nil, ZP);
9 return t;
10 }
11
12 void
13 iconinit(void)
14 {
15- Rectangle r;
16+ Rectangle r, rr;
17 Image *tmp;
18
19 if(tagcols[BACK] == nil) {
20@@ -1085,20 +1085,24 @@ iconinit(void)
21 tmp = allocimage(display, Rect(0,0,1,1), RGBA32, 1, C_TMPBUTTON);
22 fillellipse(modbutton, (Point){r.min.x + 3, r.min.y + 5}, 3, 3, tmp, ZP);
23 }else if(coolcolbtn == 3){
24+ rr = r;
25+ rr.max.y--;
26+ rr.max.x--;
27+
28 button = allocimage(display, r, screen->chan, 0, DNofill);
29 draw(button, r, tagcols[BACK], nil, ZP);
30- draw(button, insetrect(r, 1), tagcols[BORD], nil, ZP);
31- draw(button, insetrect(r, 3), tagcols[BACK], nil, ZP);
32-
33+ draw(button, insetrect(rr, 1), tagcols[BORD], nil, ZP);
34+ draw(button, insetrect(rr, 3), tagcols[BACK], nil, ZP);
35+
36 modbutton = allocimage(display, r, screen->chan, 0, DNofill);
37 draw(modbutton, r, tagcols[BACK], nil, ZP);
38- draw(modbutton, insetrect(r, 1), tagcols[BORD], nil, ZP);
39- draw(modbutton, insetrect(r, 3), tagcols[BACK], nil, ZP);
40+ draw(modbutton, insetrect(rr, 1), tagcols[BORD], nil, ZP);
41+ draw(modbutton, insetrect(rr, 3), tagcols[BACK], nil, ZP);
42 if(ispastel("tmpbtn"))
43 tmp = allocimagemix(display, C_TMPBUTTON, C_MIX);
44 else
45 tmp = allocimage(display, Rect(0,0,1,1), RGBA32, 1, C_TMPBUTTON);
46- draw(modbutton, insetrect(r, 4), tmp, nil, ZP);
47+ draw(modbutton, insetrect(rr, 4), tmp, nil, ZP);
48 freeimage(tmp);
49 }else{
50 button = allocimage(display, r, screen->chan, 0, DNofill);
51@@ -1128,9 +1132,12 @@ iconinit(void)
52 r = Rect(0, 0, Scrollwid, button->r.max.y);
53 colbutton = allocimage(display, r, screen->chan, 0, DNofill);
54 draw(colbutton, r, tagcols[BACK], nil, ZP);
55- draw(colbutton, insetrect(r, 1), tagcols[BORD], nil, ZP);
56+ rr = r;
57+ rr.max.y--;
58+ rr.max.x++;
59+ draw(colbutton, insetrect(rr, 1), tagcols[BORD], nil, ZP);
60 tmp = tilebit(1);
61- draw(colbutton, insetrect(r, 2), tmp, nil, ZP);
62+ draw(colbutton, insetrect(rr, 2), tmp, nil, ZP);
63 freeimage(tmp);
64 }else if(ispastel("winbtn"))
65 colbutton = allocimagemix(display, C_WINBUTTON, C_MIX);