commit e64f6420eb7356f3cba87caeb844fbfa9a71f934
parent dd85241b670a1e3b849df12b44c93597bfd62ae2
Author: kocotian <kocotian@kocotian.pl>
Date: Wed, 27 Jan 2021 09:40:32 +0100
progress bar
Diffstat:
3 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/config.def.h b/config.def.h
@@ -20,6 +20,9 @@ static const float linespacing = 1.4;
static const float usablewidth = 0.75;
static const float usableheight = 0.75;
+/* height of the presentation progress bar */
+static const int progressheight = 5;
+
static Mousekey mshortcuts[] = {
/* button function argument */
{ Button1, advance, {.i = +1} },
diff --git a/patches/sent-progress-bar-1.0.diff b/patches/sent-progress-bar-1.0.diff
diff --git a/sent.c b/sent.c
@@ -576,6 +576,12 @@ xdraw()
0,
slides[idx].lines[i],
0);
+ if (idx != 0 && progressheight != 0) {
+ drw_rect(d,
+ 0, xw.h - progressheight,
+ (xw.w * idx)/(slidecount - 1), progressheight,
+ 1, 0);
+ }
drw_map(d, xw.win, 0, 0, xw.w, xw.h);
} else {
if (!(im->state & SCALED))