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
1 changed files with 1 additions and 1 deletions

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()));
}
}