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
|
diff '--color=auto' --unified --recursive --text src.orig/config.def.h src.new/config.def.h
--- src.orig/config.def.h 2023-05-25 23:01:23.204266978 +0200
+++ src.new/config.def.h 2023-05-25 23:00:47.904265895 +0200
@@ -7,6 +7,7 @@
};
#define NUMFONTSCALES 42
#define FONTSZ(x) ((int)(10.0 * powf(1.1288, (x)))) /* x in [0, NUMFONTSCALES-1] */
+#define SLIDENUMBERSCALE 5
static const char *colors[] = {
"#eee8d5", /* foreground color */
Only in src.new: drw.o
Only in src.new: sent
Only in src.orig: sent-1.tar.gz
diff '--color=auto' --unified --recursive --text src.orig/sent.c src.new/sent.c
--- src.orig/sent.c 2017-09-03 23:57:26.000000000 +0200
+++ src.new/sent.c 2023-05-25 22:57:14.934259453 +0200
@@ -513,8 +513,9 @@
void
xdraw()
{
- unsigned int height, width, i;
+ unsigned int height, width, i, numw;
Image *im = slides[idx].img;
+ char num[27] = {0};
getfontsize(&slides[idx], &width, &height);
XClearWindow(xw.dpy, xw.win);
@@ -530,6 +531,19 @@
0,
slides[idx].lines[i],
0);
+ if (idx >= 0) {
+ snprintf(num, 27, "%d / %d", idx + 1, slidecount);
+ drw_setfontset(d, fonts[SLIDENUMBERSCALE]);
+ numw = drw_fontset_getwidth(d, num);
+ drw_text(d,
+ d->fonts->h / 2,
+ xw.h - d->fonts->h - d->fonts->h / 2,
+ numw,
+ d->fonts->h,
+ 0,
+ num,
+ 0);
+ }
drw_map(d, xw.win, 0, 0, xw.w, xw.h);
} else {
if (!(im->state & SCALED))
Only in src.new: sent.o
Only in src.new: util.o
|