[qwaq] Fix scrollbar thumbtab covering button

Caused by an out-by-one error.
This commit is contained in:
Bill Currie 2021-06-09 08:33:50 +09:00
parent d23c9582f1
commit 2a38135dd9

View file

@ -113,9 +113,9 @@ position_tab (ScrollBar *self)
Point o = [self.thumbTab origin];
if (self.range > 0) {
if (self.vertical) {
p.y = 1 + self.index * (self.ylen - 2) / (self.range - 1);
p.y = 1 + self.index * (self.ylen - 3) / (self.range - 1);
} else {
p.x = 1 + self.index * (self.xlen - 2) / (self.range - 1);
p.x = 1 + self.index * (self.xlen - 3) / (self.range - 1);
}
}
[self.thumbTab move:{p.x - o.x, p.y - o.y}];