浏览代码

LibGUI: End Scrollbar gutter tinting when target is reached

Before, when holding at a location in the gutter until the scrubber
reached that location, the gutter would stay tinted, even after the
target was reached, and the scrubber didn't move any more; only
stopping when the pointer was moved.
FrHun 3 年之前
父节点
当前提交
5a73bf1553
共有 1 个文件被更改,包括 5 次插入1 次删除
  1. 5 1
      Userland/Libraries/LibGUI/Scrollbar.cpp

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

@@ -276,7 +276,11 @@ void Scrollbar::on_automatic_scrolling_timer_fired()
         }
         }
         return;
         return;
     }
     }
-    m_gutter_click_state = GutterClickState::NotPressed;
+    if (m_gutter_click_state != GutterClickState::NotPressed) {
+        m_gutter_click_state = GutterClickState::NotPressed;
+        update();
+        return;
+    }
 }
 }
 
 
 void Scrollbar::mousedown_event(MouseEvent& event)
 void Scrollbar::mousedown_event(MouseEvent& event)