summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Groh <mail@linusgroh.de>2021-05-03 22:22:53 +0100
committerLinus Groh <mail@linusgroh.de>2021-05-03 22:22:53 +0100
commitaa70a56174117a43b0fe957cbe5bca9098d5d148 (patch)
treeb094f6f2fc339e771e13268fb09a42dc6b412905
parent0c1d1d97d5a63f1a62c15a42cdb62de07428f808 (diff)
downloadserenity-aa70a56174117a43b0fe957cbe5bca9098d5d148.zip
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.
-rw-r--r--Userland/Libraries/LibGUI/Scrollbar.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/Libraries/LibGUI/Scrollbar.cpp b/Userland/Libraries/LibGUI/Scrollbar.cpp
index 88deb7edb0..199443e136 100644
--- a/Userland/Libraries/LibGUI/Scrollbar.cpp
+++ b/Userland/Libraries/LibGUI/Scrollbar.cpp
@@ -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();