|
|
@@ -919,7 +919,7 @@ float Element::GetScrollLeft()
|
|
|
|
|
|
void Element::SetScrollLeft(float scroll_left)
|
|
|
{
|
|
|
- const float new_offset = Math::Clamp(Math::Round(scroll_left), 0.0f, GetScrollWidth() - GetClientWidth());
|
|
|
+ const float new_offset = Math::Round(Math::Clamp(scroll_left, 0.0f, GetScrollWidth() - GetClientWidth()));
|
|
|
if (new_offset != scroll_offset.x)
|
|
|
{
|
|
|
scroll_offset.x = new_offset;
|
|
|
@@ -937,7 +937,7 @@ float Element::GetScrollTop()
|
|
|
|
|
|
void Element::SetScrollTop(float scroll_top)
|
|
|
{
|
|
|
- const float new_offset = Math::Clamp(Math::Round(scroll_top), 0.0f, GetScrollHeight() - GetClientHeight());
|
|
|
+ const float new_offset = Math::Round(Math::Clamp(Math::Round(scroll_top), 0.0f, GetScrollHeight() - GetClientHeight()));
|
|
|
if (new_offset != scroll_offset.y)
|
|
|
{
|
|
|
scroll_offset.y = new_offset;
|
|
|
@@ -2925,8 +2925,8 @@ void Element::DirtyFontFaceRecursive()
|
|
|
void Element::ClampScrollOffset()
|
|
|
{
|
|
|
const Vector2f new_scroll_offset = {
|
|
|
- Math::Min(scroll_offset.x, GetScrollWidth() - GetClientWidth()),
|
|
|
- Math::Min(scroll_offset.y, GetScrollHeight() - GetClientHeight()),
|
|
|
+ Math::Round(Math::Min(scroll_offset.x, GetScrollWidth() - GetClientWidth())),
|
|
|
+ Math::Round(Math::Min(scroll_offset.y, GetScrollHeight() - GetClientHeight())),
|
|
|
};
|
|
|
|
|
|
if (new_scroll_offset != scroll_offset)
|