From 85ce3ef7f604c5dc3ed02b2541a07235c2e9f23a Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Sun, 14 Aug 2022 23:04:25 +0200 Subject: [PATCH] Allow maxLogoCount to be set to 0 for legacy themes. --- 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 488ab16e4..76b80b094 100644 --- a/es-core/src/components/primary/CarouselComponent.h +++ b/es-core/src/components/primary/CarouselComponent.h @@ -915,9 +915,10 @@ void CarouselComponent::applyTheme(const std::shared_ptr& theme, } if (elem->has("maxLogoCount")) { + // For legacy themes we allow a maxLogoCount (maxItemCount) of 0. if (theme->isLegacyTheme()) mMaxItemCount = - std::ceil(glm::clamp(elem->get("maxLogoCount"), 0.5f, 30.0f)); + std::ceil(glm::clamp(elem->get("maxLogoCount"), 0.0f, 30.0f)); else mMaxItemCount = glm::clamp(elem->get("maxLogoCount"), 0.5f, 30.0f); }