this repo has no description
13
fork

Configure Feed

Select the types of activity you want to include in your feed.

scrollbar: use divCeil to calculate correct height

authored by

Jari Vetoniemi and committed by
Tim Culverhouse
40e5b673 f7cbd42e

+1 -2
+1 -2
src/widgets/Scrollbar.zig
··· 25 25 // don't draw when all items can be shown 26 26 if (self.view_size >= self.total) return; 27 27 28 - var bar_height = self.view_size * win.height / self.total; 29 - if (bar_height < 0) bar_height = 1; 28 + const bar_height = @max(std.math.divCeil(usize, self.view_size * win.height, self.total) catch unreachable, 1); 30 29 const bar_top = self.top * win.height / self.total; 31 30 var i: usize = 0; 32 31 while (i < bar_height) : (i += 1)