LibGUI: Fix off-by-one in Scrollbar::scrubber_rect()
Recent changes in the button painting code made this unnecessary. For the case of value() == max(), the scrubber button would overlap the increment button. Fixes #6838.
This commit is contained in:
parent
0c1d1d97d5
commit
aa70a56174
Notes:
sideshowbarker
2024-07-18 18:44:04 +09:00
1 changed files with 1 additions and 1 deletions
|
@ -150,7 +150,7 @@ Gfx::IntRect Scrollbar::scrubber_rect() const
|
|||
if (value() == min())
|
||||
x_or_y = button_size();
|
||||
else if (value() == max())
|
||||
x_or_y = (length(orientation()) - button_size() - visible_scrubber_size()) + 1;
|
||||
x_or_y = length(orientation()) - button_size() - visible_scrubber_size();
|
||||
else {
|
||||
float range_size = max() - min();
|
||||
float available = scrubbable_range_in_pixels();
|
||||
|
|
Loading…
Add table
Reference in a new issue