From 1939080e82784a7d74478a5790efdabb4d330f70 Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Wed, 15 Feb 2023 19:19:16 +0100 Subject: [PATCH] Fixed an issue where the imageSelectedColor and textSelectedColor carousel properties would color shift too many items. --- es-core/src/components/primary/CarouselComponent.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/es-core/src/components/primary/CarouselComponent.h b/es-core/src/components/primary/CarouselComponent.h index 842a232b0..271518365 100644 --- a/es-core/src/components/primary/CarouselComponent.h +++ b/es-core/src/components/primary/CarouselComponent.h @@ -1123,7 +1123,8 @@ template void CarouselComponent::render(const glm::mat4& parentT comp->setScale(renderItem.scale); comp->setOpacity(renderItem.opacity * metadataOpacity); - if (renderItem.index == mCursor && (mHasImageSelectedColor || mHasTextSelectedColor)) { + if (renderItem.index == mCursor && std::abs(renderItem.distance) < 1.0f && + (mHasImageSelectedColor || mHasTextSelectedColor)) { if (mHasTextSelectedColor && mEntries.at(renderItem.index).data.imagePath == "" && mEntries.at(renderItem.index).data.defaultImagePath == "") { comp->setColor(mTextSelectedColor);