Fix mouse wheel scroll bug

This commit is contained in:
Magnus Norddahl 2024-01-08 17:22:58 +01:00 committed by Christoph Oelckers
parent ba274757be
commit 0f9d3b4a66

View file

@ -126,7 +126,7 @@ void ListView::OnMouseWheel(const Point& pos, EInputKey key)
}
else if (key == IK_MouseWheelDown)
{
scrollbar->SetPosition(std::max(scrollbar->GetPosition() + 20.0, scrollbar->GetMax()));
scrollbar->SetPosition(std::min(scrollbar->GetPosition() + 20.0, scrollbar->GetMax()));
}
}