From 7f5ed1c41db1499b3910c9657aa1a4cc0d86fc9d Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Tue, 11 Oct 2022 21:31:05 +0200 Subject: [PATCH] Fixed a minor graphical glitch in CarouselComponent. --- es-core/src/components/primary/CarouselComponent.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/es-core/src/components/primary/CarouselComponent.h b/es-core/src/components/primary/CarouselComponent.h index 14f372a7d..359da658e 100644 --- a/es-core/src/components/primary/CarouselComponent.h +++ b/es-core/src/components/primary/CarouselComponent.h @@ -695,6 +695,10 @@ template void CarouselComponent::render(const glm::mat4& parentT yOff += mSize.y * mVerticalOffset; } + // This is necessary to avoid single-pixel horizontal jumps at the end positions. + if (mType != CarouselType::HORIZONTAL) + xOff = std::round(xOff); + int center {0}; int centerOffset {0}; // Needed to make sure that overlapping items are renderered correctly.