소스 검색

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.
Linus Groh 4 년 전
부모
커밋
aa70a56174
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      Userland/Libraries/LibGUI/Scrollbar.cpp

+ 1 - 1
Userland/Libraries/LibGUI/Scrollbar.cpp

@@ -150,7 +150,7 @@ Gfx::IntRect Scrollbar::scrubber_rect() const
     if (value() == min())
     if (value() == min())
         x_or_y = button_size();
         x_or_y = button_size();
     else if (value() == max())
     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 {
     else {
         float range_size = max() - min();
         float range_size = max() - min();
         float available = scrubbable_range_in_pixels();
         float available = scrubbable_range_in_pixels();