| sent-progress-bar-1.0.diff - sites - public wiki contents of suckless.org | |
| git clone git://git.suckless.org/sites | |
| Log | |
| Files | |
| Refs | |
| --- | |
| sent-progress-bar-1.0.diff (912B) | |
| --- | |
| 1 diff --git a/config.def.h b/config.def.h | |
| 2 index 60eb376..25d89e0 100644 | |
| 3 --- a/config.def.h | |
| 4 +++ b/config.def.h | |
| 5 @@ -19,6 +19,9 @@ static const float linespacing = 1.4; | |
| 6 static const float usablewidth = 0.75; | |
| 7 static const float usableheight = 0.75; | |
| 8 | |
| 9 +/* height of the presentation progress bar */ | |
| 10 +static const int progressheight = 5; | |
| 11 + | |
| 12 static Mousekey mshortcuts[] = { | |
| 13 /* button function argument */ | |
| 14 { Button1, advance, {.i = +1} }, | |
| 15 diff --git a/sent.c b/sent.c | |
| 16 index c50a572..046466e 100644 | |
| 17 --- a/sent.c | |
| 18 +++ b/sent.c | |
| 19 @@ -533,6 +533,12 @@ xdraw() | |
| 20 0, | |
| 21 slides[idx].lines[i], | |
| 22 0); | |
| 23 + if (idx != 0 && progressheight != 0) { | |
| 24 + drw_rect(d, | |
| 25 + 0, xw.h - progressheight, | |
| 26 + (xw.w * idx)/(slidecount - 1), progres… | |
| 27 + 1, 0); | |
| 28 + } | |
| 29 drw_map(d, xw.win, 0, 0, xw.w, xw.h); | |
| 30 } else { | |
| 31 if (!(im->state & SCALED)) |