diff options
Diffstat (limited to 'sdext')
-rw-r--r-- | sdext/source/presenter/PresenterScrollBar.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sdext/source/presenter/PresenterScrollBar.cxx b/sdext/source/presenter/PresenterScrollBar.cxx index 6aab45820c42..d811c92cfaa0 100644 --- a/sdext/source/presenter/PresenterScrollBar.cxx +++ b/sdext/source/presenter/PresenterScrollBar.cxx @@ -659,7 +659,7 @@ void PresenterVerticalScrollBar::UpdateBorders() else { const double nThumbSize = ::std::min(mnThumbSize,mnTotalSize); - const double nThumbPosition = ::std::min(::std::max(0.0,mnThumbPosition), mnTotalSize - nThumbSize); + const double nThumbPosition = ::std::clamp(mnThumbPosition, 0.0, mnTotalSize - nThumbSize); maBox[Thumb] = geometry::RealRectangle2D( 0, nThumbPosition / mnTotalSize * nPagerHeight, aWindowBox.Width, |