1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 13:28:11 +00:00

LibGUI: Don't invalidate scrollbar rect if disabled

No need to repaint if it's not scrollable, this saves a tiny bit of
repaint :)
This commit is contained in:
Marcus Nilsson 2021-07-19 11:42:53 +02:00 committed by Gunnar Beutner
parent 0229663102
commit b57f7def1f

View file

@ -327,6 +327,9 @@ Scrollbar::Component Scrollbar::component_at_position(const Gfx::IntPoint& posit
void Scrollbar::mousemove_event(MouseEvent& event)
{
if (!is_scrollable())
return;
m_last_mouse_position = event.position();
auto old_hovered_component = m_hovered_component;