Fix missing pixel in scrollbar

This commit is contained in:
Guldoman 2022-04-12 03:20:27 +02:00
parent 4f434d1a41
commit 43086a9c24
No known key found for this signature in database
GPG Key ID: C08A498EC7F1AFDD
1 changed files with 2 additions and 2 deletions

View File

@ -101,12 +101,12 @@ end
function View:scrollbar_overlaps_point(x, y)
local sx, sy, sw, sh = self:get_scrollbar_rect()
return x >= sx - style.scrollbar_size * 3 and x < sx + sw and y >= sy and y < sy + sh
return x >= sx - style.scrollbar_size * 3 and x < sx + sw and y > sy and y <= sy + sh
end
function View:scrollbar_track_overlaps_point(x, y)
local sx, sy, sw, sh = self:get_scrollbar_track_rect()
return x >= sx - style.scrollbar_size * 3 and x < sx + sw and y >= sy and y < sy + sh
return x >= sx - style.scrollbar_size * 3 and x < sx + sw and y > sy and y <= sy + sh
end