From 8545c619edef7e64680a91240c96255e6b280f66 Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Sun, 26 Mar 2023 19:29:35 +0200 Subject: [PATCH] Fixed an issue where the scissor box size in ScrollableContainer was sometimes not calculated correctly --- es-core/src/components/ScrollableContainer.cpp | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/es-core/src/components/ScrollableContainer.cpp b/es-core/src/components/ScrollableContainer.cpp index 63cb21854..07d4ec040 100644 --- a/es-core/src/components/ScrollableContainer.cpp +++ b/es-core/src/components/ScrollableContainer.cpp @@ -243,13 +243,7 @@ void ScrollableContainer::render(const glm::mat4& parentTrans) glm::mat4 trans {parentTrans * getTransform()}; glm::ivec2 clipPos {static_cast(trans[3].x), static_cast(trans[3].y)}; - - glm::vec3 dimScaled {0.0f, 0.0f, 0.0f}; - dimScaled.x = std::fabs(trans[3].x + mSize.x); - dimScaled.y = std::fabs(trans[3].y + mAdjustedHeight); - - glm::ivec2 clipDim {static_cast(dimScaled.x - trans[3].x), - static_cast(dimScaled.y - trans[3].y)}; + glm::ivec2 clipDim {mSize.x, mAdjustedHeight}; // By effectively clipping the upper and lower boundaries of the container we mostly avoid // scrolling outside the vertical starting and ending positions.